Is :root only used for vars?

In CSS, is :root only used to change the style of vars?

No. It is commonly used for that, but you can use it for anything for styles on the root part (html).
So instead of html { font-size: 20px; }, you could also do :root { font-size: 20px; }.

1 Like