creating variables on css code example
Example 1: css set variable
:root {
--main-bg-color: coral;
}
#div1 {
background-color: var(--main-bg-color);
}
#div2 {
background-color: var(--main-bg-color);
}
Example 2: how to use variables in css
:root {
--clr-primary-1: hsl(205, 86%, 17%);
}
.container{
background-color: var(--clr-primary-3);
}