What is the correct syntax to use a custom property in your CSS?
- #property-name
- &property-name
- *property-name
- --property-name
To use a custom property (also known as a CSS variable), you should use the syntax --property-name. Custom properties allow you to define reusable values in your CSS and use them throughout your stylesheet. They are preceded by two hyphens and are referenced with the var() function, like var(--property-name).
Loading...
Related Quiz
- Animating properties like opacity and transform is considered more performant because they don't trigger ________ in most browsers.
- You are tasked with creating a list where every even item has a gray background. Which CSS selector would help you accomplish this?
- What does the CSS property "line-height" primarily affect?
- What is the main advantage of using CSS-in-JS?
- How would you select list items that are the only child within their containing unordered list?