Hi,
I have just started the theory section on CSS variables and I am not clear as to the advantage of it. In the first example, they show the following code:
:root {
–main-color: #3498db;
}
.button {
background-color: var(–main-color);
}
It seems like you have to write a lot more code to use a variable in this way. Not only do you need to state here what main color is under root, you have to type more characters than a color after background-color. Is this cleverness for its own good?