Top "Css-variables" questions

Custom properties (or CSS variables) allow to define stylesheet-wide values identified by a token and usable in all CSS declarations.

CSS variables with fallback for older browsers

TL;DR: How can you use SCSS to have CSS variables with a fallback for older browsers. I'm trying to …

css sass css-variables
Any way to use CSS Variables in SASS functions?

I have defined a color in my root: :root { --purple: hsl(266, 35%, 70%); } And I'm trying to use it in a SASS …

css sass css-variables
CSS Variables and String concatenation

I'm trying to use CSS variables to generate a dynamic path. Example: :root { --fonts-path: "/path/to/font"; } @font-face { font-family: "FontName"; …

css webpack css-variables
How to create color shades using CSS variables similar to darken() of SASS?

I'm looking a way of modifying a CSS variable as you would in SCSS Define a color like primary - …

css sass css-variables
How do you inspect CSS variables in the browser?

I am defining my variables as per the spec like so: :root { --my-colour: #000; } And accessing them like this: .my-element { background: …

html css google-chrome-devtools web-component css-variables
How can I detect CSS Variable support with JavaScript?

The latest version of Firefox has support for CSS Variables, but Chrome, IE and loads of other browsers do not. …

javascript css browser-feature-detection css-variables
Bootstrap 4 - Reference a color by root name in css

I'm using a nice Bootstrap 4 css theme which overrides default one with very nice colors but I'm not being able …

html css bootstrap-4 css-variables
Svelte: Is there a way to make global css variables in scope of svelte components?

I have set my global.css file which I import in index.js --root { --main-color: red; } * { margin: 0; padding: 0; box-sizing: border-box; } …

css css-variables svelte
Are CSS Custom Properties global across linked CSS documents?

I'm experimenting with a lot of success with CSS3 Custom Properties (aka CSS Variables). I'm talking about the --black: #000; and …

css css-variables
Using CSS @Variables

I am trying to use CSS Variables. I look online for tutorials and all of them worked so far. Here's …

css css-variables