feature: selectors status: use tags: fallback kind: css polyfillurls: moreurl: https://docs.microsoft.com/en-us/previous-versions//cc351024(v=vs.85)#selectors
Most CSS Selectors are supported from IE8 onwards, so you should be safe to use them. But do note that, on browsers that do not support these selectors, a whole rule will be detected as invalid if these unsupported selectors are present. For example, in IE6 #main, p:first-child {}
would be invalid because it is unable to understand p:first-child
. We strongly recommend you do not try to polyfill this, but if you do need one, you could use Selectivizr.
- These very useful selectors:
:nth-child(n)
,:last-child
,:target
,:not(s)
,:enabled
,:disabled
,:checked
,::selection
- These ones, too:
:root
,:nth-last-child(n)
,:nth-of-type(n)
,:nth-last-of-type(n)
,:first-of-type
,:last-of-type
,:only-child
,:only-of-type
,:empty