Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 6.8k
Support theming with CSS Custom Properties #4352
Copy link
Copy link
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: themingblockedThis issue is blocked by some external factor, such as a prerequisite PRThis issue is blocked by some external factor, such as a prerequisite PRfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesneeds: discussionFurther discussion with the team is needed before proceedingFurther discussion with the team is needed before proceeding
Description
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: themingblockedThis issue is blocked by some external factor, such as a prerequisite PRThis issue is blocked by some external factor, such as a prerequisite PRfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesneeds: discussionFurther discussion with the team is needed before proceedingFurther discussion with the team is needed before proceeding
feature 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:
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.