The --var: ; hack to toggle multiple values with one custom property
Read OriginalThis article explains a clever CSS hack using custom properties. By setting a property like `--foo: ;` (a single space), you can use `var(--foo, fallback-value)` to conditionally append or remove multiple style values (like gradients, borders, shadows) across different properties and rules, acting as a single-clause conditional.
0 komentářů
komentářů
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet