Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Is :root a completely safe hack for IE8 and modern browsers? Re: Is :root a completely safe hack for IE8 and modern browsers?

#126616
Kitty Giraudel
Participant

We have a variant of it at http://browserhacks.com:

:root * > .selector {}

Your way seems simpler. I’ll have to run some tests.

If you want to target everything but IE 6/7/8 you can also go with one of the following:

@media screen and (min-width: 400px) {}
body:last-child .selector {}
body:nth-of-type(1) .selector {}
body:first-of-type .selector {}