To use a CSS variable, the syntax is var(________, optionalDefaultValue).

  • --variable-name
  • $variable-name
  • #variable-name
  • @variable-name
In CSS, the correct syntax for using a variable is var(--variable-name, optionalDefaultValue). The double hyphen -- is used to declare a variable, and it is accessed using the var() function.
Add your answer
Loading...

Leave a comment

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