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.

CSS variable doesn't working on IE.

See original GitHub issue

Describe 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:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
johnkennedy9147commented, Jun 13, 2018

@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?

0reactions
scissorsneedfoodtoocommented, Aug 22, 2018

@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.

Read more comments on GitHub >

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

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