Csswg-drafts: [selectors-4] should the >> syntax for the descendant combinator still exist?

Created on 24 Oct 2016  Â·  8Comments  Â·  Source: w3c/csswg-drafts

Depending on the resolution of #640, I think we should perhaps consider removing the >> synonym for the descendant combinator, currently specified in selectors-4. It's not clear to me if the extra syntax is still worthwhile if >>> is removed.

Needs Edits selectors-4

Most helpful comment

The >> syntax also serves the purpose of clarification. a >> b is more explicit than a b.

Sebastian

All 8 comments

The >> syntax also serves the purpose of clarification. a >> b is more explicit than a b.

Sebastian

I think that would have been a fine argument when CSS1 was being developed, but I believe at this point having two syntaxes for the same thing would reduce clarity.

Adding one data point:
according to http://caniuse.com/#search=%3E%3E Safari 10 and Safari Technology Preview
already implements >>.

As I tested on my local OSX, >> did not work on Safari 10.0.1, but it DID work on Safari TP 16.

I believe at this point having two syntaxes for the same thing would reduce clarity.

I can see that this might be the case if both combinators are mixed within style sheets, though my argument that a >> b is more explicit is still valid.

Sebastian

It was added to webkit in https://bugs.webkit.org/show_bug.cgi?id=140525 with some resistance and a final note:

I'll nuke ">>" if it goes out of the spec.

cc @BenjaminPoulain

Looks like the last comment was made 2+ years ago...
Still, is this dependent on https://github.com/w3c/webcomponents/issues/78 to make any move forward?

WebKit support for >> was removed in https://trac.webkit.org/r221788

The Working Group just discussed [selectors-4] should thesyntax for the descendant combinator still exist?.

The full IRC log of that discussion
<dael> Topic: [selectors-4] should thesyntax for the descendant combinator still exist?

<dael> github: https://github.com/w3c/csswg-drafts/issues/641

<dael> fantasai: We had intro a double child selector syntax. The reason to do that was to a have a visually representative syntax for a desc. combinator but more was to bridge gap between child and shadow piercing descendant selector. Shadow piercing was removed or obj and && syntax was removed. Do we want to persue to have visable combinator or drop it?

<dael> Rossen_: dbaron I see you proposed the removal originally. Do you still favor removing?

<dael> dbaron: I would. Introducing new syntax and dealing with compat isn't a thing we should spend time on without a good reason to do so

<dael> Rossen_: Other opinions or obj?

<astearns> +1 for removal. It's nice but not worth it

<dael> fantasai: What dbaron said made sense

<dael> Rossen_: I'm also with dbaron

<dael> Resolved: removed the descendant combinator from selectors 4

Was this page helpful?
0 / 5 - 0 ratings