Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
20 lines (16 sloc) 1.26 KB

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.

When you sunset IE8 support, you can use:

  • 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
You can’t perform that action at this time.