Caniuse: CSS Level 4 Selectors (e.g. :scope with Element.querySelector)

Created on 12 May 2015  Â·  48Comments  Â·  Source: Fyrd/caniuse

CSS Level 4 Selectors

Available on site now:


This issue was imported from Google Moderator

Moderator votes: +18
Issue added by Jared J on 2014-04-17
To vote this issue up or down, simply include +1 or -1 in your comment.

GM import Support data suggestion set

Most helpful comment

Pseudo-classes to add to this issue:

  • Logical

    • [x] [:is()](https://caniuse.com/#feat=mdn-css_selectors_is)

    • [x] [:where()](https://caniuse.com/#feat=mdn-css_selectors_where)

    • [x] [:has()](https://caniuse.com/#feat=css-has)

  • Location

    • [x] [:any-link](https://caniuse.com/#feat=css-any-link)

    • [ ] :local-link

    • [ ] :target-within

    • [x] [:scope](https://caniuse.com/#feat=mdn-css_selectors_scope)

  • Time

    • [ ] :past

    • [ ] :current

    • [ ] :future

  • Input

    • [ ] :intermediate

    • [x] [:blank](https://caniuse.com/#feat=mdn-css_selectors_blank)

    • [ ] :user-invalid

  • Table

    • [ ] :nth-col

    • [ ] :nth-last-col

All 48 comments

+1 I was hoping this worked in IE 11. It doesn't.

+1
i'm mostly interested in explicitly choosing a compound selector as the "subject":
http://www.w3.org/TR/selectors4/#subject

+1

+1

I'd like to see this, especially for nth-match

also see http://www.sitepoint.com/future-generation-css-selectors-level-4/, especially :matches() :)

+1

+1

+1

I'd have looked up case-insensitive attribute matches (see http://www.w3.org/TR/selectors4/#attribute-case )

+1

+1

+1

+1 (nth-match especially)

+1

+1
Would specifically like to see the upgraded :not negation selector that can take lists of simple selectors.

+1

+1

+1

+1

+1

+1

+1

+1

case insensitive modifier is now available at http://caniuse.com/#feat=css-case-insensitive

(for others please add comment)

Regarding some of the other items:

  • Selector subject spec
  • :nth-match spec

Neither of those is present in the current draft. I believe "Selector subject" was dropped in favor of :has(), and :nth-match was dropped in favor of http://caniuse.com/#feat=css-nth-child-of

@cvrebert Thanks! Have updated the list accordingly.

:optional now available at http://caniuse.com/#feat=css-optional-pseudo

+1

:focus-within now available at http://caniuse.com/#feat=css-focus-within

:dir now available at http://caniuse.com/#feat=css-dir-pseudo

:scope +1

@Fyrd compound selectors in :not() is CSS4 too. Firefox currently doesn't support it for this reason, but Chrome and WebKit do.

@nickleus selector subjects have been replaced with :has().

@stevenvachon Is that somehow different from http://caniuse.com/#feat=css-not-sel-list ?

@cvrebert that refers to :not(.class1, .class2) where I'm referring to :not(.class1.class2).

+1 Please!

+1

+1 especially for :blank

:scope probably should be listed because it's supported by most of the non-Microsoft browsers according to https://developer.mozilla.org/en-US/docs/Web/CSS/:scope and that'd make it really easy for someone to miss that important caveat during development.

What is the state of :scope?

It worth noting that :empty has different meaning in CSS Level 4 Selectors — now it matches nodes containing only white-spaces. :blank has removed that meaning, and now it's proposed for empty inputs (at-risk).

Pseudo-classes to add to this issue:

  • Logical

    • [x] [:is()](https://caniuse.com/#feat=mdn-css_selectors_is)

    • [x] [:where()](https://caniuse.com/#feat=mdn-css_selectors_where)

    • [x] [:has()](https://caniuse.com/#feat=css-has)

  • Location

    • [x] [:any-link](https://caniuse.com/#feat=css-any-link)

    • [ ] :local-link

    • [ ] :target-within

    • [x] [:scope](https://caniuse.com/#feat=mdn-css_selectors_scope)

  • Time

    • [ ] :past

    • [ ] :current

    • [ ] :future

  • Input

    • [ ] :intermediate

    • [x] [:blank](https://caniuse.com/#feat=mdn-css_selectors_blank)

    • [ ] :user-invalid

  • Table

    • [ ] :nth-col

    • [ ] :nth-last-col

Many of them are actively being implemented, such as :is() selector. Currently only the MDN data is listed.

:local-link

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Schweinepriester picture Schweinepriester  Â·  3Comments

rowbot-weisguy picture rowbot-weisguy  Â·  3Comments

valtido picture valtido  Â·  3Comments

LifeIsStrange picture LifeIsStrange  Â·  3Comments

bappygolder picture bappygolder  Â·  3Comments