Optimize Your CSS Length with CSS Variablesby@edemagbenyo
1,098 reads

Optimize Your CSS Length with CSS Variables

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

CSS Variables are values we define to be re-used throughout a CSS document. CSS variables are set in one place and referenced at many places like you will set a variable in other programming languages. A variable in CSS is defined by starting it with two dashes, followed by the name of the variable. The var keyword that we use to access a custom variable takes two parameters. The first one is the name the property to be substituted, the second is a fallback value. There is a significant reduction in the number of line in code that was written.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Optimize Your CSS Length with CSS Variables
Edem Agbenyo HackerNoon profile picture

@edemagbenyo

Edem Agbenyo

I’m a Senior Full Stack Javascript engineer who loves solving problem using technology.


Receive Stories from @edemagbenyo

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!