CSS Vars with no values
See original GitHub issueI copied the stylesheet into my project and tweaked it a bit.
I added the postcss-custom-properties-fallback
plugin and set it up in my postcss config.
When I refresh the page the css vars seem to have no values.
If I add a dummy css property (see GIF) to the root’s direct child and remove it the css vars suddenly have values and I see the panel.
I even tried to copy the css vars themselves from defaults.json
.
I’ve experienced this on Desktop Chrome and Android Chrome but IPhone Chrome/Safari works fine. 🤷🏻
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Is there a null or undefined or "falsy" value for css custom ...
It doesn't look like a falsy value in a sense that the fallback is not used if none is the first argument of...
Read more >var() - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The var() CSS function can be used to insert the value of a custom property (sometimes called a "CSS variable") instead of any...
Read more >What no one told you about CSS Variables
An important rule is to always consider CSS variables (custom properties) as ordinary properties and not only variables that store values.
Read more >A Complete Guide To CSS Variables [With Examples]
The var() in CSS is used to enter the value of a custom property (also known as CSS variables) instead of any component...
Read more >CSS Variables - The var() function - W3Schools
Syntax of the var() Function ; name, Required. The variable name (must start with two dashes) ; value, Optional. The fallback value (used...
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 Free
Top 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
Ok glad it worked out in the end 👍
Unfortunately i have more than one snap point. I solved it with some css on my part that is good enough for me (something specific for my use case). I’ll keep in mind this solution for future uses. Thanks a lot for your time and quick response!