scoper icon indicating copy to clipboard operation
scoper copied to clipboard

using :root/html selectors has no effect

Open eddr opened this issue 9 years ago • 2 comments

Again, in Chrome/Vivaldi, using ":root" selector doesn't seem to have any effect It is important, because you'd want to use ":root" or "html" to specify font-size and use "rem" size units

eddr avatar Apr 06 '16 15:04 eddr

Thanks @eddr. Can you create an example on JSBin or JSFiddle of how you'd like to use :root or html this way? I don't see how you'd want to select :root or html in a scoped element — you could just use a standard style element in head for this.

thomaspark avatar Apr 07 '16 22:04 thomaspark

Thanks @thomaspark! Are you asking why I'd want such a thing? Well, because :

  1. I have to embed/inject my code in a webpage which is not mine
  2. I want to use "font-size" with "rem" units, which are useful, which are defined for the ":root". And I can't change it for the whole document, because it's not mine.

Is that what you've asked?

eddr avatar Apr 07 '16 22:04 eddr