Skip to content

Commit 35fbb27

Browse files
committed
[selectors4] Draft definition of scope-relative selectors. (Needs more work later.)
1 parent 5bde327 commit 35fbb27

3 files changed

Lines changed: 43 additions & 24 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
<meta content="CSS Flexible Box Layout Module" name=dcterms.title>
1313
<meta content=text name=dcterms.type>
14-
<meta content=2012-12-03 name=dcterms.issued>
14+
<meta content=2012-12-04 name=dcterms.issued>
1515
<meta content="http://dev.w3.org/csswg/css3-flexbox/" name=dcterms.creator>
1616
<meta content=W3C name=dcterms.publisher>
17-
<meta content="http://www.w3.org/TR/2012/ED-css3-flexbox-20121203/"
17+
<meta content="http://www.w3.org/TR/2012/ED-css3-flexbox-20121204/"
1818
name=dcterms.identifier>
1919
<link href="http://dev.w3.org/csswg/default.css" rel=stylesheet
2020
type="text/css">
@@ -217,11 +217,11 @@
217217

218218
<h1 id=head-box-flexible>CSS Flexible Box Layout Module</h1>
219219

220-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 3 December 2012</h2>
220+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 4 December 2012</h2>
221221

222222
<dl>
223223
<dt>This version:
224-
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20121203/">http://www.w3.org/TR/2012/CR-css3-flexbox-20121203/</a>-->
224+
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20121204/">http://www.w3.org/TR/2012/CR-css3-flexbox-20121204/</a>-->
225225

226226
<dd><a
227227
href="http://dev.w3.org/csswg/css3-flexbox/">http://dev.w3.org/csswg/css3-flexbox/</a>

selectors4/Overview.html

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
rel=dcterms.rights>
1010
<meta content="Selectors Level 4" name=dcterms.title>
1111
<meta content=text name=dcterms.type>
12-
<meta content=2012-11-27 name=dcterms.issued>
12+
<meta content=2012-12-04 name=dcterms.issued>
1313
<meta content="http://dev.w3.org/csswg/selectors4/" name=dcterms.creator>
1414
<meta content=W3C name=dcterms.publisher>
15-
<meta content="http://www.w3.org/TR/2012/ED-selectors4-20121127/"
15+
<meta content="http://www.w3.org/TR/2012/ED-selectors4-20121204/"
1616
name=dcterms.identifier>
1717
<link href="../default.css" rel=stylesheet type="text/css">
1818
<style type="text/css">
@@ -29,14 +29,14 @@
2929

3030
<h1 id=title>Selectors Level 4</h1>
3131

32-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 27 November
32+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 December
3333
2012</h2>
3434

3535
<dl>
3636
<dt>This version:
3737

38-
<dd><a href="http://www.w3.org/TR/2012/ED-selectors4-20121127/">
39-
http://www.w3.org/TR/2012/ED-selectors4-20121127/</a>
38+
<dd><a href="http://www.w3.org/TR/2012/ED-selectors4-20121204/">
39+
http://www.w3.org/TR/2012/ED-selectors4-20121204/</a>
4040

4141
<dt>Editor's draft:
4242

@@ -1234,8 +1234,14 @@ <h3 id=subject><span class=secno>3.2. </span> Determining the Subject of a
12341234
<h3 id=scoping><span class=secno>3.3. </span> Scoped Selectors</h3>
12351235

12361236
<p>Some host applications may choose to <dfn id=scope>scope</dfn> selectors
1237-
to a particular subtree of the document. There are two methods of doing
1238-
this:
1237+
to a particular subtree of the document. The root of the scoping subtree
1238+
is called the <dfn id=scoping-element>scoping element</dfn>, and is
1239+
in-scope. When scoped selectors are used, it forms the <a
1240+
href="#contextual-reference-element-set"><i>contextual reference element
1241+
set</i></a> and matches the <a
1242+
href="#scope-pseudo"><code>:scope</code></a> pseudo-class.
1243+
1244+
<p>There are three methods of scoping selectors:
12391245

12401246
<dl>
12411247
<dt><dfn id=scope-contained>scope-contained</dfn> selectors
@@ -1252,14 +1258,18 @@ <h3 id=scoping><span class=secno>3.3. </span> Scoped Selectors</h3>
12521258
<dd> With this method of scoping, a selector matches if the <i>subject</i>
12531259
of the selector is within the scope, even if other components of the
12541260
selector are outside the scope.
1255-
</dl>
12561261

1257-
<p>The root of the scoping subtree is called the <dfn
1258-
id=scoping-element>scoping element</dfn> and is in-scope. When scoped
1259-
selectors are used, it forms the <a
1260-
href="#contextual-reference-element-set"><i>contextual reference element
1261-
set</i></a> and can be selected with the <a
1262-
href="#scope-pseudo"><code>:scope</code></a> pseudo-class.
1262+
<dt><dfn id=scope-relative>scope-relative</dfn> selectors
1263+
1264+
<dd> With this method of scoping, "<a
1265+
href="#scope-pseudo"><code>:scope</code></a> " (the <a
1266+
href="#scope-pseudo"><code>:scope</code></a> pseudo-class followed by a
1267+
space) is implied at the beginning of each <a href="#complex"><i>complex
1268+
selector</i></a>, allowing them to begin syntactically with a <a
1269+
href="#combinator"><i>combinator</i></a>. The scoping element matches
1270+
this implied <a href="#scope-pseudo"><code>:scope</code></a> selector,
1271+
but does not limit which elements match.
1272+
</dl>
12631273

12641274
<div class=example>
12651275
<p> For example, the <code>element.querySelector()</code> function defined

selectors4/Overview.src.html

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,12 @@ <h3 id="scoping">
600600

601601
<p>Some host applications may choose to <dfn>scope</dfn> selectors
602602
to a particular subtree of the document.
603-
There are two methods of doing this:
603+
The root of the scoping subtree is called the <dfn>scoping element</dfn>,
604+
and is in-scope.
605+
When scoped selectors are used, it forms the <i>contextual reference element set</i>
606+
and matches the <code>:scope</code> pseudo-class.
607+
608+
<p>There are three methods of scoping selectors:
604609

605610
<dl>
606611
<dt><dfn>scope-contained</dfn> selectors
@@ -616,12 +621,16 @@ <h3 id="scoping">
616621
With this method of scoping, a selector matches if
617622
the <i>subject</i> of the selector is within the scope,
618623
even if other components of the selector are outside the scope.
619-
</dl>
620624

621-
<p>The root of the scoping subtree is called the <dfn>scoping element</dfn>
622-
and is in-scope.
623-
When scoped selectors are used, it forms the <i>contextual reference element set</i>
624-
and can be selected with the <code>:scope</code> pseudo-class.
625+
<dt><dfn>scope-relative</dfn> selectors
626+
<dd>
627+
With this method of scoping,
628+
"<code>:scope</code> " (the <code>:scope</code> pseudo-class followed by a space)
629+
is implied at the beginning of each <i>complex selector</i>,
630+
allowing them to begin syntactically with a <i>combinator</i>.
631+
The scoping element matches this implied <code>:scope</code> selector,
632+
but does not limit which elements match.
633+
</dl>
625634

626635
<div class='example'>
627636
<p>

0 commit comments

Comments
 (0)