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.

Styles removed completely in IE11 on 3rd call to cssVars

See original GitHub issue

Not sure if this is a duplicate of https://github.com/jhildenbiddle/css-vars-ponyfill/issues/148 or not

I am having issues in IE11, whereby multiple callls to cssVars cause the styles to be removed completely - logging cssText in the onComplete callback shows that cssText is an empty string.

The problem only occurs in IE11. It works fine in Firefox and Chrome (and yes I have set onlyLegacy to false).

I have noticed that after calling cssVars the first time, the link I am targeting has disabled="" in IE11, but not in the modern browsers. Not sure if that is the cause of the problem or not.

It is on the third call to cssVars that the cssText is empty.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jhildenbiddlecommented, Jan 31, 2021

@muster-mark, @JaxonWright

Fixed in 2.4.3.

This update also properly handles (i.e., ignores) stylesheets disabled by the user via JS (by setting sheet.disabled to true) or a disabled attribute on a <link> tag.

Thanks again for your patience on this one.

1reaction
jhildenbiddlecommented, Jan 4, 2021

Apologies for the delayed fix, folks. Holidays + switching to an M1-based Mac that doesn’t play well with node-based projects have pushed back a quick fix. I’ll do my best to get to it before EOW.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IE11 - does a polyfill / script exist for CSS variables?
Yes, so long as you're processing root-level custom properties (IE9+). GitHub: https://github.com/jhildenbiddle/css-vars-ponyfill ...
Read more >
IE11 callback when variables have updated? #98 - GitHub
I'm updating css variables using variables when a user logs in to my application. In IE11, I'm experiencing a delay before the variables...
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 to use CSS custom properties (a.k.a. variables)
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...
Read more >
css-vars-ponyfill - GitHub Pages
css -vars-ponyfill - Client-side support for CSS custom properties (aka "CSS ... or <style> node has been added or removed … or manually...
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