-
Notifications
You must be signed in to change notification settings - Fork 792
Expand file tree
/
Copy pathdeferred-for-level-5
More file actions
29 lines (25 loc) · 1.32 KB
/
deferred-for-level-5
File metadata and controls
29 lines (25 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<h3 id="idref-combinators">
Reference combinators <code>/ref/</code></h3>
The <dfn export>reference combinator</dfn> consists of two slashes
with an intervening <a href="http://www.w3.org/TR/css3-namespace/#css-qnames">CSS qualified name</a>,
and separates two <a>compound selectors</a>,
e.g. ''A /attr/ B''.
The element represented by the first <a>compound selector</a>
explicitly references
the element represented by the second <a>compound selector</a>.
Unless the host language defines a different syntax for expressing this relationship,
this relationship is considered to exist if
the value of the specified attribute on the first element is an IDREF or an <a>ID selector</a>
referencing the second element.
Attribute matching for reference combinators follow the same rules as for <a href="http://www.w3.org/TR/css3-selectors/#attribute-selectors">attribute selectors</a>.
<div class="example">
The following example highlights an <a element>input</a> element
when its <a href="http://www.w3.org/TR/html40/interact/forms.html#h-17.9"><code><label></code></a>
is focused or hovered-over:
<pre>
label:matches(:hover, :focus) /for/ input, /* association by "for" attribute */
label:matches(:hover, :focus):not([for]) input { /* association by containment */
box-shadow: yellow 0 0 10px;
}
</pre>
</div>