Variables & Custom Properties
Variables & Custom Properties
we can make some variables in css like for font size and color so that we will not have to write them again and again
ex-
--primary-color: blue;
--maxw: 33px;
this is the way of adding a variable
note
if we add it to a css selector it will work only in that selector
ie. it's a local variable
to make it work in all the selectors use like
:root{
--primary-color: blue;
--danger-color: red;
--maxw: 333px;
}
Comments
Post a Comment