-
Notifications
You must be signed in to change notification settings - Fork 715
[selectors-4] should the >> syntax for the descendant combinator still exist? #641
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
Comments
The 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: As I tested on my local OSX, |
I can see that this might be the case if both combinators are mixed within style sheets, though my argument that Sebastian |
Its future is not yet decided: w3c/csswg-drafts#641 Only WebKit supports it. We shouldn't encourage other browsers to implement it until a final decision is made on whether we want to keep it.
It was added to webkit in https://bugs.webkit.org/show_bug.cgi?id=140525 with some resistance and a final note:
|
Looks like the last comment was made 2+ years ago... |
Its future is not yet decided: w3c/csswg-drafts#641 Only WebKit supports it. We shouldn't encourage other browsers to implement it until a final decision is made on whether we want to keep it.
WebKit support for >> was removed in https://trac.webkit.org/r221788 |
https://bugs.webkit.org/show_bug.cgi?id=175765 Reviewed by Sam Weinig. LayoutTests/imported/w3c: Tests for these have been removed in WPT master, just update expectations until new version is imported. * web-platform-tests/dom/nodes/Element-matches-expected.txt: * web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt: * web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt: * web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt: Source/WebCore: This is an alternative syntax for the normal descendant combinator (just space) that was advertised as being consistent with > (child combinator) and >>> (shadow piercing combinator). The latter has been killed so it is not consistent with anything anymore. No other engine besides WebKit has implemented this and the WPT tests have been removed (in web-platform-tests/wpt#6785). Full removal from spec is still open (w3c/csswg-drafts#641) but we shouldn't encourage adoption of this pointless feature. While this has shipped the compatibility risk is low as no other engine implemented it and there were no incentives to use it over the standard syntax. * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText const): * css/CSSSelector.h: (WebCore::CSSSelector::hasDescendantRelation const): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::matchRecursively const): * css/SelectorFilter.cpp: (WebCore::SelectorFilter::collectIdentifierHashes): * css/parser/CSSParserSelector.cpp: (WebCore::CSSParserSelector::appendTagHistory): * css/parser/CSSParserSelector.h: * css/parser/CSSSelectorParser.cpp: (WebCore::isDescendantCombinator): (WebCore::CSSSelectorParser::consumeCombinator): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation): LayoutTests: * fast/css/ancestor-of-hovered-element-removed.html: * fast/css/css-selector-text-expected.txt: * fast/css/css-selector-text.html: * fast/css/css-set-selector-text-expected.txt: * fast/css/css-set-selector-text.html: * fast/css/currentColor-value-style-update.html: * fast/css/descendant-combinator-doubled-child-syntax-styling-expected.html: Removed. * fast/css/descendant-combinator-doubled-child-syntax-styling.html: Removed. * fast/css/parsing-css-attribute-case-insensitive-value-1-expected.txt: * fast/css/parsing-css-attribute-case-insensitive-value-1.html: * fast/css/parsing-css-attribute-case-insensitive-value-4-expected.txt: * fast/css/parsing-css-attribute-case-insensitive-value-4.html: * fast/css/parsing-css-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html: Removed. * fast/selectors/case-insensitive-attribute-register-requirement-2.html: * fast/selectors/element-closest-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html: Removed. * fast/selectors/element-matches-attribute-ascii-case-insensitive-html.html: * fast/selectors/element-matches-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html: Removed. * fast/selectors/id-attribute-querySelector-used-as-id-selector-quirks.html: * fast/selectors/id-attribute-querySelector-used-as-id-selector.html: * fast/selectors/nth-child-matching-first.html: * fast/selectors/nth-last-child-matching-first.html: * fast/selectors/querySelector-attribute-ascii-case-insensitive-html.html: * fast/selectors/querySelector-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@221788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Its future is not yet decided: w3c/csswg-drafts#641 Only WebKit supports it. We shouldn't encourage other browsers to implement it until a final decision is made on whether we want to keep it.
The Working Group just discussed The full IRC log of that discussion<dael> Topic: [selectors-4] should thesyntax for the descendant combinator still exist?<dael> github: https://github.com//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 |
CSS Selectors 4 previously allowed >> as an alternative for whitespace. This has been removed. resolves w3c#641
CSS Selectors 4 previously allowed >> as an alternative for whitespace. This has been removed. resolves w3c#641
CSS Selectors 4 previously allowed >> as an alternative for whitespace. This has been removed. resolves #641
https://bugs.webkit.org/show_bug.cgi?id=175765 Reviewed by Sam Weinig. LayoutTests/imported/w3c: Tests for these have been removed in WPT master, just update expectations until new version is imported. * web-platform-tests/dom/nodes/Element-matches-expected.txt: * web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt: * web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt: * web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt: Source/WebCore: This is an alternative syntax for the normal descendant combinator (just space) that was advertised as being consistent with > (child combinator) and >>> (shadow piercing combinator). The latter has been killed so it is not consistent with anything anymore. No other engine besides WebKit has implemented this and the WPT tests have been removed (in web-platform-tests/wpt#6785). Full removal from spec is still open (w3c/csswg-drafts#641) but we shouldn't encourage adoption of this pointless feature. While this has shipped the compatibility risk is low as no other engine implemented it and there were no incentives to use it over the standard syntax. * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText const): * css/CSSSelector.h: (WebCore::CSSSelector::hasDescendantRelation const): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::matchRecursively const): * css/SelectorFilter.cpp: (WebCore::SelectorFilter::collectIdentifierHashes): * css/parser/CSSParserSelector.cpp: (WebCore::CSSParserSelector::appendTagHistory): * css/parser/CSSParserSelector.h: * css/parser/CSSSelectorParser.cpp: (WebCore::isDescendantCombinator): (WebCore::CSSSelectorParser::consumeCombinator): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation): LayoutTests: * fast/css/ancestor-of-hovered-element-removed.html: * fast/css/css-selector-text-expected.txt: * fast/css/css-selector-text.html: * fast/css/css-set-selector-text-expected.txt: * fast/css/css-set-selector-text.html: * fast/css/currentColor-value-style-update.html: * fast/css/descendant-combinator-doubled-child-syntax-styling-expected.html: Removed. * fast/css/descendant-combinator-doubled-child-syntax-styling.html: Removed. * fast/css/parsing-css-attribute-case-insensitive-value-1-expected.txt: * fast/css/parsing-css-attribute-case-insensitive-value-1.html: * fast/css/parsing-css-attribute-case-insensitive-value-4-expected.txt: * fast/css/parsing-css-attribute-case-insensitive-value-4.html: * fast/css/parsing-css-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html: Removed. * fast/selectors/case-insensitive-attribute-register-requirement-2.html: * fast/selectors/element-closest-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html: Removed. * fast/selectors/element-matches-attribute-ascii-case-insensitive-html.html: * fast/selectors/element-matches-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html: Removed. * fast/selectors/id-attribute-querySelector-used-as-id-selector-quirks.html: * fast/selectors/id-attribute-querySelector-used-as-id-selector.html: * fast/selectors/nth-child-matching-first.html: * fast/selectors/nth-last-child-matching-first.html: * fast/selectors/querySelector-attribute-ascii-case-insensitive-html.html: * fast/selectors/querySelector-descendant-combinator-doubled-child-syntax-expected.txt: Removed. * fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html: Removed. Canonical link: https://commits.webkit.org/193141@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
The text was updated successfully, but these errors were encountered: