CSS4 selector subject support #236

Closed
kraih opened this Issue Dec 9, 2011 · 11 comments

Comments

Projects
None yet
6 participants
@kraih
Owner

kraih commented Dec 9, 2011

Once the CSS4 selector spec becomes more stable, i think we should add selector subject support to Mojo::DOM::CSS again.

http://dev.w3.org/csswg/selectors4/#subject

A previous attempt had to be aborted since the exact semantics are not clear yet, but many of the implementation details should be reusable.

3bdecef

@tempire

This comment has been minimized.

Show comment
Hide comment
@tempire

tempire Dec 9, 2011

Collaborator

Yay

Collaborator

tempire commented Dec 9, 2011

Yay

@kraih

This comment has been minimized.

Show comment
Hide comment
@kraih

kraih Dec 12, 2011

Owner

They better hurry up with the spec, this is so useful.

Owner

kraih commented Dec 12, 2011

They better hurry up with the spec, this is so useful.

@marcusramberg

This comment has been minimized.

Show comment
Hide comment
@marcusramberg

marcusramberg Jan 8, 2012

Collaborator

Editor's Draft 3 was released January 2012

Collaborator

marcusramberg commented Jan 8, 2012

Editor's Draft 3 was released January 2012

@kraih

This comment has been minimized.

Show comment
Hide comment
@kraih

kraih Jan 9, 2012

Owner

Looks like semantics and syntax did not change this time, lets hope it stays that way.

Owner

kraih commented Jan 9, 2012

Looks like semantics and syntax did not change this time, lets hope it stays that way.

@judofyr

This comment has been minimized.

Show comment
Hide comment
@judofyr

judofyr Jul 31, 2012

One thing that the spec doesn't clarify:

<p>123</p>
<p>456</p>
<div id="toc"></div>

?p ~ #toc can either:

  1. Work like p ~ #toc, but instead of returning #toc it follows the parent-chain and returns one of the p's instead.
  2. Return both p's.

I think that the second option makes more sense, but it's quite a lot harder to implement.

judofyr commented Jul 31, 2012

One thing that the spec doesn't clarify:

<p>123</p>
<p>456</p>
<div id="toc"></div>

?p ~ #toc can either:

  1. Work like p ~ #toc, but instead of returning #toc it follows the parent-chain and returns one of the p's instead.
  2. Return both p's.

I think that the second option makes more sense, but it's quite a lot harder to implement.

@kraih

This comment has been minimized.

Show comment
Hide comment
@kraih

kraih Jul 31, 2012

Owner

The spec seems pretty clear about that actually, it can only be 1.

Although the element structure that the selector represents is the same with or without the exclamation mark, indicating the subject in this way can change which compound selector represents the subject in that structure.

Owner

kraih commented Jul 31, 2012

The spec seems pretty clear about that actually, it can only be 1.

Although the element structure that the selector represents is the same with or without the exclamation mark, indicating the subject in this way can change which compound selector represents the subject in that structure.

@dpetrov

This comment has been minimized.

Show comment
Hide comment
@dpetrov

dpetrov Oct 17, 2012

Editor's Draft 4 released 15 October 2012

dpetrov commented Oct 17, 2012

Editor's Draft 4 released 15 October 2012

@mokko

This comment has been minimized.

Show comment
Hide comment
@mokko

mokko May 24, 2013

Selectors Level 4, Editor's Draft 13 May 2013
W3C Working Draft 2 May 2013

mokko commented May 24, 2013

Selectors Level 4, Editor's Draft 13 May 2013
W3C Working Draft 2 May 2013

@kraih

This comment has been minimized.

Show comment
Hide comment
@kraih

kraih Jan 6, 2014

Owner

Interesting change in the spec, a selector can now have multiple subjects.

!div > !p.warning
Owner

kraih commented Jan 6, 2014

Interesting change in the spec, a selector can now have multiple subjects.

!div > !p.warning
@kraih

This comment has been minimized.

Show comment
Hide comment
@kraih

kraih May 31, 2014

Owner

Looks like subject selectors have been replaced with the :has() pseudo-class now. http://dev.w3.org/csswg/selectors4/#relational

Owner

kraih commented May 31, 2014

Looks like subject selectors have been replaced with the :has() pseudo-class now. http://dev.w3.org/csswg/selectors4/#relational

@kraih

This comment has been minimized.

Show comment
Hide comment
@kraih

kraih May 31, 2014

Owner

The spec is still changing so much, i don't think we can really plan ahead.

Owner

kraih commented May 31, 2014

The spec is still changing so much, i don't think we can really plan ahead.

@kraih kraih closed this May 31, 2014

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