CSS variable doesn't working on IE.
See original GitHub issueDescribe your problem and - if possible - how to reproduce it
From CSS variable lesson, I just want to inform that IE doesn’t supports CSS variables as well as it’s fallback value. It’d be great if your team will curate those lessons/challenges or add alternate CSS property with that.
background: black; // IE & un-supported browsers
background: var(--var-name, black);
Add a Link to the page with the problem
Started from this lesson.
Tell us about your browser and operating system
- Browser Name: Chrome
- Browser Version: 67+
- Operating System: Windows 10
If possible, add a screenshot here
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Workaround for CSS variables in IE? - Stack Overflow
Yes there is a way, the same way you make any css compatible: use a specific css fallback that is supported by the...
Read more >How to use CSS custom properties (a.k.a. variables)
Note: CSS variables are not and won't be supported in IE11. You can either create a static stylesheet for all UA browsers or...
Read more >Resolving CSS Variables for Internet Explorer
Open an HTML5 target. · Select the Advanced tab. · Select Resolve CSS variables (required for IE compatibility). · Click Save the active...
Read more >Cross Browser Compatibility of CSS Variables (Custom ...
CSS Variables (Custom Properties) is Not Supported on Internet Explorer 11. If you use CSS Variables (Custom Properties) and your users are ...
Read more >How do you deal with IE in regard to CSS variables? - Reddit
So now, you have set #f0f (or whatever) and then, if css vars are supported, they are overridden by the var, if not,...
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
@adsingh14 Thanks for raising this.
Fallbacks as described in this lesson are not for older browsers that lack CSS variable support, they are for when the variable has not been defined yet, or otherwise not able to be resolved.
The technique you mention of using a preceding more broadly supported CSS rule is also referred to as a fallback.
Ideally, I think there should be two lessons, one describing each.
@raisedadead whats the situation with adding additional lessons?
@joshalling, great! Looking forward to seeing what you come up with. I would say it’s better to have two separate PRs, one for the fix and another for the new lesson.