Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selectors Level 4 selectors fail to parse #1292

Closed
timmywil opened this issue Apr 23, 2013 · 7 comments
Closed

Selectors Level 4 selectors fail to parse #1292

timmywil opened this issue Apr 23, 2013 · 7 comments

Comments

@timmywil
Copy link

These Level 4 Selectors currently fail to parse and will be considered valid some time in the future. I may have missed some, but I went through the spec and I think these are all of them.

/* http://dev.w3.org/csswg/selectors4/#column-combinator */
col.selected || td {}
/* http://dev.w3.org/csswg/selectors4/#idref-combinators */
label:matches(:hover, :focus) /for/ input,
label:matches(:hover, :focus):not([for]) input {}
/* http://dev.w3.org/csswg/selectors4/#subject */
!ol > li:only-child {}
/* http://dev.w3.org/csswg/selectors4/#attrnmsp */
@namespace foo "http://www.example.com";
[foo|att=val] { color: blue }
[*|att] { color: yellow }
[|att] { color: green }
@lukeapage
Copy link
Member

which are implemented by browsers?

attributes I implemented in 1.4.0 beta the others we have said we will support when the spec is stable enough that it is unlikely to change and that it is implemented by 1 (ore preferably more) browsers

@timmywil
Copy link
Author

Nice! I didn't know you had implemented attr namespaces already. AFAIK, none of these are supported yet except in experimental environments (for instance, Chrome with certain flags). I will be demonstrating these selectors in a presentation, but there probably aren't a lot of people in my position. Mostly, I figured it would be helpful for this repo to have a list for when they are implemented.

For what it's worth, the syntax for the subject selector could very well change, but the rest will probably be in the final draft.

@jonschlinkert
Copy link
Contributor

Helpful to have the list, thank you. @timmywil if you're satisfied with the answer you can close the issue. Feel free to keep it open or continue the discussion here.

@lukeapage
Copy link
Member

related to #550

lets leave it open... the time when we need to support them is approaching - if chrome and mozilla implement via flags and people are making software for 6 months time or libraries etc then they might like to start using them.

@jonschlinkert
Copy link
Contributor

👍 would love to see these features supported.

@TedDriggs
Copy link

It also chokes on the grid row declaration syntax (see http://msdn.microsoft.com/en-us/library/windows/apps/hh466350.aspx for more)

-ms-grid-rows: 10px (250px 10px)[4];

@matthew-dean
Copy link
Member

Three years later it doesn't appear that CSS Selectors Level 4 is any closer to exiting an editor's draft, and a few things have changed in the syntax in that time. (See: https://drafts.csswg.org/selectors-4/) Implementing parsing support is risky until it's in CR status. Closing this. Re-open a new issue once it reaches the stage of implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants