Skip to content

Commit 05210d6

Browse files
author
Jirka Kosek
committed
[selectors-nonelement] Added ITS example using attribute node selector
1 parent 38c3239 commit 05210d6

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

selectors-nonelement/Overview.bs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,16 @@ Attribute node selector</h3>
5151
</div>
5252

5353
<div class="example">
54-
TODO: Provide a real-world example from ITS or something.
54+
The following ITS rules use attribute node selector to switch off
55+
translatability of <code>title</code> attribute on <code>abbr</code> elements.
56+
<pre>
57+
&lt;rules xmlns="http://www.w3.org/2005/11/its"
58+
version="2.0"
59+
queryLanguage="css">
60+
&lt;translateRule selector="abbr::attr(title)" translate="no"/>
61+
&lt;/rules>
62+
</pre>
63+
5564
</div>
5665

5766
In CSS, <a>attribute node pseudo-elements</a> never generate boxes.

selectors-nonelement/Overview.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,14 @@ <h3 class="heading settled heading" data-level=2.1 id=attribute-node-selector><s
162162
</div>
163163

164164
<div class=example>
165-
TODO: Provide a real-world example from ITS or something.
165+
The following ITS rules use attribute node selector to switch off
166+
translatability of <code>title</code> attribute on <code>abbr</code> elements.
167+
<pre>&lt;rules xmlns="http://www.w3.org/2005/11/its"
168+
version="2.0"
169+
queryLanguage="css"&gt;
170+
&lt;translateRule selector="abbr::attr(title)" translate="no"/&gt;
171+
&lt;/rules&gt;
172+
</pre>
166173
</div>
167174

168175
<p> In CSS, <a data-link-type=dfn href=#attribute-node-pseudo-element title="attribute node pseudo-elements">attribute node pseudo-elements</a> never generate boxes.

selectors-nonelement/make.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@curl https://api.csswg.org/bikeshed/ -F file=@Overview.src.html > Overview.html
1+
@curl https://api.csswg.org/bikeshed/ -F file=@Overview.bs > Overview.html

0 commit comments

Comments
 (0)