You want to set a global color scheme for a website using CSS variables. Where would be the best place to define these custom properties?

  • In a separate CSS variables file
  • In an external CSS file
  • In the CSS for each individual element
  • In the HTML section
To set a global color scheme for a website using CSS variables, it's best to define these custom properties in an external CSS file. This allows you to centralize your variable definitions, making it easier to maintain and update the color scheme across your entire website. While you can define CSS variables in other places like the HTML section or inline CSS for specific elements, it's not as efficient or maintainable for global color schemes.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *