Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CSS Vars FallbackNew to Visual Studio Code? Get it now.
CSS Vars Fallback

CSS Vars Fallback

Pavel

|
3,428 installs
| (0) | Free
Provides fallback for CSS Vars
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CSS Vars Fallback

Provides a "hardcode" fallback for CSS variables for better backwards compatability with legacy browsers. Works something like Autoprefixer.

This is my first plugin in its first build, so please, don't judge.

Features

Finds in CSS code simple construction like

:root {
    --red: #ff0000;
}

div {
    color: var(--red);
}

And replaces it with

:root {
    --red: #ff0000;
}

div {
    color: #ff0000;
    color: var(--red);
}

New "evergreen" browsers that support CSS Variables will use var() instruction. Legacy browsers will ignore it and fall back to the rule in line above.

Requirements

Here will be some requirements when I figure out what they are and if I have any. -_-'

Known Issues

All the issues are unknown and yet to be tested.

Release Note

0.0.4

Fixed bug when same rules in different places were ignored Algorithm rewritten

0.0.3

Whitespace is replaced correctly Improvement in single line rules processing

0.0.2

Readme update

0.0.1

Initial release of alpha build

I hope you enjoy it

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft