Support theming with CSS Custom Properties
See original GitHub issuefeature request
Use CSS custom properties for at least color selection.
What is the expected behaviour?
To be able to alter the color-scheme during runtime on supported browsers, and fall-back to predefined SASS defined colors on others
Here is a sample (by Cris Coyier) of how CSS custom properties might work
Is there anything else we should know?
Here is a simple sass mixin that might help:
@mixin variable($property, $variable, $fallback) {
#{$property}: $fallback;
#{$property}: var($variable);
}
By using something like that mixin, support for browsers that have no CSS variables support, stay’s the same way as its now, while supported browsers gain a way more flexible way to use colors.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:62
- Comments:68 (26 by maintainers)
Top Results From Across the Web
CSS Custom Properties and Theming
Lots of people think of theming as one of the major use-cases for CSS Custom Properties. Let's look at some other folks examples....
Read more >A guide to theming in CSS - LogRocket Blog
A CSS variable (also called a custom property) is a variable you assign a CSS value to and reuse throughout your application. In...
Read more >What is Website Theming? How to Use CSS Custom ...
CSS custom properties are entities which hold values that you can reuse throughout an entire site or document. For the sake of this...
Read more >CSS Custom Properties | Styling and Themes | Flow - Vaadin
CSS custom properties and variables allow you to define custom properties and their values, which you can then later reference in other style...
Read more >Using CSS custom properties (variables) - MDN Web Docs
Custom properties allow a value to be stored in one place, then referenced in multiple other places. An additional benefit is semantic ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It will likely be early 2020 (when Microsoft plans to end support for IE11)
IE11 support should ALWAYS be taken into account, regardless of when Microsoft says they’re phasing out anything. There are many, many companies out there with older versions of Windows that couldn’t care less about keeping up to date, and enterprise products would need to have IE11 far into the future to remain competitive.