...



Expand

Francesco Bertocci

Sr. Product/UX/UI Designer
Shared this

Using CSS custom properties (variables)

#CSS #WenDevelopment
Link image


Complex websites have very large amounts of CSS, often with a lot of repeated values. For example, the same colour might be used in hundreds of different places, requiring global search and replace if that colour needs to change. CSS variables allow a value to be stored in one place, then referenced in multiple other places. An additional benefit is semantic identifiers. For example --main-text-color is easier to understand than #00ff00, especially if this same color is also used in another context.

Get it!



Scan & Share
Using css custom properties variables  css  mdn


Get QRCover