From 9371f33dbf75a2eb8a570dbde1d0c27a5e7c82f4 Mon Sep 17 00:00:00 2001 From: Eric Willigers Date: Thu, 4 Jan 2018 11:48:06 +1100 Subject: [PATCH] [selectors] Single form for descendant combinator CSS Selectors 4 previously allowed >> as an alternative for whitespace. This has been removed. resolves #641 --- selectors-4/Overview.bs | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/selectors-4/Overview.bs b/selectors-4/Overview.bs index 71e6649f1da..57241dc94c4 100644 --- a/selectors-4/Overview.bs +++ b/selectors-4/Overview.bs @@ -446,10 +446,10 @@ Selectors Overview 3 - E F or E >> F + E F an F element descendant of an E element [[#descendant-combinators]] - 1 or 4 + 1 E > F an F element child of an E element @@ -2964,19 +2964,16 @@ Typed Child-indexed Pseudo-classes Combinators

-Descendant combinator ( ) or (>>)

+Descendant combinator ( ) At times, authors may want selectors to describe an element that is the descendant of another element in the document tree (e.g., "an em element that is contained within an H1 element"). The descendant combinator expresses such a relationship. - It has two syntactic forms: -
    -
  1. whitespace that separates two compound selectors or -
  2. A doubled child selector (>>) -
- A selector of the form ''A B'' or ''A >> B''' represents an element B that is an + A descendant combinator is whitespace that separates two compound selectors. + + A selector of the form ''A B'' represents an element B that is an arbitrary descendant of some ancestor element A.
@@ -3012,12 +3009,6 @@ Descendant combinator ( ) or (>>)
div p *[href]
- Note: Note that the whitespace form has existed since CSS Level 1, - whereas the >> form is introduced in Level 4. - It was introduced to give the descendant combinator a visible, non-whitespace form - and to bridge the gap between the child combinator (>) - and the shadow-piercing descendant combinator (>>>) [[CSS-SCOPING-1]]. -

Child combinator (>)

@@ -3311,7 +3302,7 @@ Grammar <simple-selector> = <> | <> - <combinator> = '>>' | '>' | '+' | '~' | [ '||' ] + <combinator> = '>' | '+' | '~' | [ '||' ] <type-selector> = <> | <>? '*' @@ -3720,7 +3711,6 @@ Changes Significant changes since the 2 May 2013 Working Draft include:
    -
  • Added the ''>>'' notation for the descendant selector.
  • Added the '':target-within'', '':focus-within'', '':focus-visible'', '':playing'', and '':paused'' pseudo-classes.
  • Added a zero-specificity '':matches()''-type pseudo-class, with name TBD.
  • Replaced subject indicator (''!'') feature with '':has()''.