CSS Consistency

CSS

Declaring Reusable Properties

Declaring variables is really a good shortcut, because you don't have to copy-paste the same property everywhere - just put the variable in a place you want and you only have to change the value one time to make changes to all elements that have this variable:

You can declare anything for a variable. You can of course make variables and reuse them infinitely.

Dynamic Theme Switching with Variables

You can also redeclare these variables, as this example shows below:

When the background changes by the toggler, the "--bg" variable gets changed a new property - the color was defined white, but now its redefined as black and the same goes for text, just viceversa. It switches back to white after retoggling.

Another example of variables because why not

Similar to the first code. This one just uses one variable in 2 places (--gutter):