Optimize Your CSS Length with CSS Variables

Written by edemagbenyo | Published 2020/02/15
Tech Story Tags: css | css-variables | custom-property | css-length | learn-css | programming | software-development | coding

TLDR 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.via the TL;DR App

no story

Written by edemagbenyo | I’m a Senior Full Stack Javascript engineer who loves solving problem using technology.
Published by HackerNoon on 2020/02/15