Comments (6)
@asangma global style: globalStyle: "src/assets/styles/includes.scss",
from calcite-app-components.
Thanks @driskull!
from calcite-app-components.
I think this is pretty much how we want to do theming:
https://stackoverflow.com/questions/52624110/can-stenciljs-component-use-external-theming?answertab=votes#tab-top
Using CSS properties (variables)
from calcite-app-components.
Looks like I have something working nicely here:
:root {
// Background
--background: #{$white};
--background__content: #{$lightest-gray};
// :hover :active :current
--background--highlight: #{$lightest-blue};
// Foreground
--foreground: #{$darker-gray};
--foreground__interactive: #{$darker-gray};
// Foreground :states
--foreground__interactive--highlight: #{$dark-blue};
// Borders
--border: #{rgba($darker-gray, 0.25)};
}
:root([theme="dark"]) {
// Background
--background: #{$darker-gray};
--background-content: #{$darkest-gray};
// Background :hover :active :current
--background--highlight: #{$darkest-gray};
// Foreground
--foreground: #{$lightest-gray};
--foreground__interactive: #{$lighter-gray};
// Foreground :hover :active :current
--foreground__interactive--highlight: #{$v-bb-120}; // Vibrant Blue
// Borders
--border: #{rgba($lightest-gray, 0.25)};
}
And in e.g. calcite-action
:host .calcite-action__button {
...
color: var(--foreground__interactive);
fill: var(--foreground__interactive);
background-color: var(--background);
...
}
from calcite-app-components.
related to: Esri/calcite-design-system#39 & #50
from calcite-app-components.
Here is what Calcite is proposing for handling theming. Esri/calcite-design-system#66
'@stencil/state-tunnel'
https://github.com/ionic-team/stencil-state-tunnel
https://github.com/ionic-team/stencil-state-tunnel/wiki
from calcite-app-components.
Related Issues (20)
- Enhancement: Support dragging items between Calcite Value Lists HOT 3
- Enhancement: Reusable border style HOT 1
- Tooling: Add changelog for prerelease/next updates HOT 1
- Bug: Action icon scale should be medium unless Action scale is L HOT 3
- Bug: action-bar does not synchronize expanded state with new children HOT 2
- calcite-value-list: calciteListItemChange event HOT 4
- Bug: calcite-pick-list group items remain when filtering HOT 6
- Bug: calcite-block-section toggle button spacing HOT 2
- Tooling: ensure changelog contains changes from prereleases HOT 2
- Bug: calcite-shell-center-row, if no actionBar specified get an error HOT 1
- Enhancement: ActionBar & ActionPad. Add scale property that its Actions inherit. HOT 1
- Bug: Action. Icon size update. HOT 1
- Bug: calcite-block-section calciteBlockSectionToggle is not fired anymore HOT 3
- Bug: calcite-pick-list-item is always using the circleF icon even when not selected HOT 3
- slot-container height of 0 HOT 4
- [calcite-app-components] migration plan HOT 1
- Enhancement: Ability to drag and drop items between different lists HOT 3
- Enhancement: Ability to set orientation (vertical/horizontal) on calcite-action-bar HOT 1
- Bug: calcite-block-section and intlExpand/intlCollapse HOT 1
- Enhancement: Make Calcite-Value-List-Item fully draggable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calcite-app-components.