I am defining my variables as per the spec like so:
:root {
--my-colour: #000;
}
And accessing them like this:
.my-element {
background: var( --my-colour );
}
Which works fine.
However I was wondering if there was a way of debugging or inspecting the :root
CSS rule to see what variables have been defined, and what their values were?
From my understanding the :root
selector and html
selectors both target the same element however when I inspect the html
element using Chrome's debugging tools I cannot see anything defined:
Is there a way finding out what variables have been defined and their values?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…