question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support theming with CSS Custom Properties

See original GitHub issue

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:

@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:open
  • Created 6 years ago
  • Reactions:62
  • Comments:68 (26 by maintainers)

github_iconTop GitHub Comments

25reactions
jelbourncommented, Feb 20, 2018

It will likely be early 2020 (when Microsoft plans to end support for IE11)

14reactions
jpike88commented, May 28, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found