You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the above rule, "<code>p > a</code>" is the selector,
259
+
<p>In the above rule, "<code>p > a</code>" is the selector,
260
260
which, if the source document is HTML,
261
-
selects any <code><a></code> elements that are children of a <code><p></code> element.
261
+
selects any <code><a></code> elements that are children of a <code><p></code> element.</p>
262
262
263
-
"<code>color: blue;</code>" is a declaration specifying that,
263
+
<p>"<code>color: blue;</code>" is a declaration specifying that,
264
264
for the elements that match the selector,
265
265
their <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-color-3/#color0title=color>color</a> property should have the value <spanclass=cssdata-link-type=maybetitle=blue>blue</span>.
266
266
Similarly, their <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-text-decor-3/#propdef-text-decorationtitle=text-decoration>text-decoration</a> property should have the value <spanclass=cssdata-link-type=maybetitle=underline>underline</span>.
267
-
</div>
267
+
</div><p></p>
268
268
269
269
<p>At-rules are all different, but they have a basic structure in common.
270
270
They start with an "@" <adata-link-type=dfnhref=#code-pointtitle="code point">code point</a> followed by their name.
where the "…" is the sequence of bytes corresponding to the encoding’s label.
492
492
</details><p></p>
493
493
494
-
If the return value was <code>utf-16be</code> or <code>utf-16le</code>,
494
+
<p>If the return value was <code>utf-16be</code> or <code>utf-16le</code>,
495
495
use <code>utf-8</code> as the fallback encoding;
496
496
if it was anything else except failure,
497
-
use the return value as the fallback encoding.
497
+
use the return value as the fallback encoding.</p>
498
498
499
499
<detailsclass=why>
500
500
<summary>Why use utf-8 when the declaration says utf-16?</summary>
501
501
502
-
The bytes of the encoding declaration spell out “<code>@charset "…";</code>” in ASCII,
502
+
<p>The bytes of the encoding declaration spell out “<code>@charset "…";</code>” in ASCII,
503
503
but UTF-16 is not ASCII-compatible.
504
504
Either you’ve typed in complete gibberish (like <code>䁣桡牳整•utf-16be∻</code>) to get the right bytes in the document,
505
505
which we don’t want to encourage,
506
506
or your document is actually in an ASCII-compatible encoding
507
-
and your encoding declaration is lying.
507
+
and your encoding declaration is lying.</p>
508
508
509
509
<p>Either way, defaulting to UTF-8 is a decent answer.</p>
510
510
511
-
As well, this mimics the behavior of HTML’s <code><meta charset></code> attribute.
512
-
</details>
511
+
<p>As well, this mimics the behavior of HTML’s <code><meta charset></code> attribute.
512
+
</details><p></p>
513
513
514
514
<pclass=note>Note: Note that the syntax of an encoding declaration <em>looks like</em> the syntax of an <aclass=css-codedata-link-type=at-rulehref=#at-ruledef-charsettitle=@charset>@charset</a> rule,
New formats and new linking mechanisms <b>should not</b> provide an <adata-link-type=dfnhref=#environment-encodingtitle="environment encoding">environment encoding</a>,
555
555
so the stylesheet defaults to UTF-8 instead in the absence of more explicit information.</p>
556
556
557
-
Note: <adata-biblio-type=informativedata-link-type=bibliohref=#htmltitle=html>[HTML]</a> defines <ahref=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-stylesheet>the environment encoding for <code><link rel=stylesheet></code></a>.
557
+
<pclass=note>Note: <adata-biblio-type=informativedata-link-type=bibliohref=#htmltitle=html>[HTML]</a> defines <ahref=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-stylesheet>the environment encoding for <code><link rel=stylesheet></code></a>.</p>
558
558
559
-
Note: <adata-biblio-type=informativedata-link-type=bibliohref=#cssomtitle=cssom>[CSSOM]</a> defines <ahref=http://dev.w3.org/csswg/cssom/#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction>the environment encoding for <code><xml-stylesheet?></code></a>.
559
+
<pclass=note>Note: <adata-biblio-type=informativedata-link-type=bibliohref=#cssomtitle=cssom>[CSSOM]</a> defines <ahref=http://dev.w3.org/csswg/cssom/#requirements-on-user-agents-implementing-the-xml-stylesheet-processing-instruction>the environment encoding for <code><xml-stylesheet?></code></a>.</p>
560
560
561
-
Note: <adata-biblio-type=informativedata-link-type=bibliohref=#css3cascadetitle=css3cascade>[CSS3CASCADE]</a> defines <ahref=http://dev.w3.org/csswg/css-cascade/#at-ruledef-import>the environment encoding for <code>@import</code></a>.
561
+
<pclass=note>Note: <adata-biblio-type=informativedata-link-type=bibliohref=#css3cascadetitle=css3cascade>[CSS3CASCADE]</a> defines <ahref=http://dev.w3.org/csswg/css-cascade/#at-ruledef-import>the environment encoding for <code>@import</code></a>.</p>
<divdata-fill-with=normative-references><dl><dtid=css21title=CSS21><aclass=self-linkhref=#css21></a>[CSS21]<dd>Bert Bos; et al. <ahref=http://www.w3.org/TR/2011/REC-CSS2-20110607>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. W3C Recommendation. URL: <ahref=http://www.w3.org/TR/2011/REC-CSS2-20110607>http://www.w3.org/TR/2011/REC-CSS2-20110607</a><dtid=css3cascadetitle=CSS3CASCADE><aclass=self-linkhref=#css3cascade></a>[CSS3CASCADE]<dd>Håkon Wium Lie; Elika J. Etemad; Tab Atkins Jr.. <ahref=http://www.w3.org/TR/2013/CR-css-cascade-3-20131003/>CSS Cascading and Inheritance Level 3</a>. 3 October 2013. W3C Candidate Recommendation. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/CR-css-cascade-3-20131003/>http://www.w3.org/TR/2013/CR-css-cascade-3-20131003/</a><dtid=encodingtitle=ENCODING><aclass=self-linkhref=#encoding></a>[ENCODING]<dd>Anne van Kesteren; Joshua Bell. <ahref=http://encoding.spec.whatwg.org/>Encoding</a>. Living Standard. URL: <ahref=http://encoding.spec.whatwg.org/>http://encoding.spec.whatwg.org/</a><dtid=rfc2119title=RFC2119><aclass=self-linkhref=#rfc2119></a>[RFC2119]<dd>S. Bradner. <ahref=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <ahref=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a><dtid=selecttitle=SELECT><aclass=self-linkhref=#select></a>[SELECT]<dd>Tantek Çelik; et al. <ahref=http://www.w3.org/TR/2011/REC-css3-selectors-20110929/>Selectors Level 3</a>. 29 September 2011. W3C Recommendation. URL: <ahref=http://www.w3.org/TR/2011/REC-css3-selectors-20110929/>http://www.w3.org/TR/2011/REC-css3-selectors-20110929/</a><dtid=unicodetitle=UNICODE><aclass=self-linkhref=#unicode></a>[UNICODE]<dd>The Unicode Consortium. <ahref=http://www.unicode.org/standard/versions/enumeratedversions.html>The Unicode Standard</a>. 2013. Defined by: The Unicode Standard, Version 6.3.0, (Mountain View, CA: The Unicode Consortium, 2013. ISBN 978-1-936213-08-5), as updated from time to time by the publication of new versions URL: <ahref=http://www.unicode.org/standard/versions/enumeratedversions.html>http://www.unicode.org/standard/versions/enumeratedversions.html</a></dl></div>
<dtid=css3cascadetitle=CSS3CASCADE><aclass=self-linkhref=#css3cascade></a>[CSS3CASCADE]<dd>Håkon Wium Lie; Elika J. Etemad; Tab Atkins Jr.. <ahref=http://www.w3.org/TR/2013/CR-css-cascade-3-20131003/>CSS Cascading and Inheritance Level 3</a>. 3 October 2013. W3C Candidate Recommendation. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/CR-css-cascade-3-20131003/>http://www.w3.org/TR/2013/CR-css-cascade-3-20131003/</a></dd>
5121
+
<dtid=encodingtitle=ENCODING><aclass=self-linkhref=#encoding></a>[ENCODING]<dd>Anne van Kesteren; Joshua Bell. <ahref=http://encoding.spec.whatwg.org/>Encoding</a>. Living Standard. URL: <ahref=http://encoding.spec.whatwg.org/>http://encoding.spec.whatwg.org/</a></dd>
5122
+
<dtid=rfc2119title=RFC2119><aclass=self-linkhref=#rfc2119></a>[RFC2119]<dd>S. Bradner. <ahref=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <ahref=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a></dd>
5123
+
<dtid=selecttitle=SELECT><aclass=self-linkhref=#select></a>[SELECT]<dd>Tantek Çelik; et al. <ahref=http://www.w3.org/TR/2011/REC-css3-selectors-20110929/>Selectors Level 3</a>. 29 September 2011. W3C Recommendation. URL: <ahref=http://www.w3.org/TR/2011/REC-css3-selectors-20110929/>http://www.w3.org/TR/2011/REC-css3-selectors-20110929/</a></dd>
5124
+
<dtid=unicodetitle=UNICODE><aclass=self-linkhref=#unicode></a>[UNICODE]<dd>The Unicode Consortium. <ahref=http://www.unicode.org/standard/versions/enumeratedversions.html>The Unicode Standard</a>. 2013. Defined by: The Unicode Standard, Version 6.3.0, (Mountain View, CA: The Unicode Consortium, 2013. ISBN 978-1-936213-08-5), as updated from time to time by the publication of new versions URL: <ahref=http://www.unicode.org/standard/versions/enumeratedversions.html>http://www.unicode.org/standard/versions/enumeratedversions.html</a></dd>
<divdata-fill-with=informative-references><dl><dtid=css-variablestitle=CSS-VARIABLES><aclass=self-linkhref=#css-variables></a>[CSS-VARIABLES]<dd>Tab Atkins Jr.; Luke Macpherson; Daniel Glazman. <ahref=http://www.w3.org/TR/2013/WD-css-variables-20130620/>CSS Custom Properties for Cascading Variables Module Level 1</a>. 20 June 2013. W3C Working Draft. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/WD-css-variables-20130620/>http://www.w3.org/TR/2013/WD-css-variables-20130620/</a><dtid=css3-animationstitle=CSS3-ANIMATIONS><aclass=self-linkhref=#css3-animations></a>[CSS3-ANIMATIONS]<dd>Dean Jackson; et al. <ahref=http://www.w3.org/TR/2013/WD-css3-animations-20130219/>CSS Animations</a>. 19 February 2013. W3C Working Draft. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/WD-css3-animations-20130219/>http://www.w3.org/TR/2013/WD-css3-animations-20130219/</a><dtid=css3-conditionaltitle=CSS3-CONDITIONAL><aclass=self-linkhref=#css3-conditional></a>[CSS3-CONDITIONAL]<dd>L. David Baron. <ahref=http://www.w3.org/TR/2013/CR-css3-conditional-20130404/>CSS Conditional Rules Module Level 3</a>. 4 April 2013. W3C Candidate Recommendation. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/CR-css3-conditional-20130404/>http://www.w3.org/TR/2013/CR-css3-conditional-20130404/</a><dtid=cssomtitle=CSSOM><aclass=self-linkhref=#cssom></a>[CSSOM]<dd>Anne van Kesteren. <ahref=http://www.w3.org/TR/2011/WD-cssom-20110712/>CSSOM</a>. 12 July 2011. W3C Working Draft. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2011/WD-cssom-20110712/>http://www.w3.org/TR/2011/WD-cssom-20110712/</a><dtid=htmltitle=HTML><aclass=self-linkhref=#html></a>[HTML]<dd>Ian Hickson. <ahref=http://whatwg.org/html>HTML</a>. Living Standard. URL: <ahref=http://whatwg.org/html>http://whatwg.org/html</a><dtid=mediaqtitle=MEDIAQ><aclass=self-linkhref=#mediaq></a>[MEDIAQ]<dd>Florian Rivoal. <ahref=http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/>Media Queries</a>. 19 June 2012. W3C Recommendation. URL: <ahref=http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/>http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/</a></dl></div>
5129
+
<divdata-fill-with=informative-references><dl>
5130
+
<dtid=css-variablestitle=CSS-VARIABLES><aclass=self-linkhref=#css-variables></a>[CSS-VARIABLES]<dd>Tab Atkins Jr.; Luke Macpherson; Daniel Glazman. <ahref=http://www.w3.org/TR/2013/WD-css-variables-20130620/>CSS Custom Properties for Cascading Variables Module Level 1</a>. 20 June 2013. W3C Working Draft. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/WD-css-variables-20130620/>http://www.w3.org/TR/2013/WD-css-variables-20130620/</a></dd>
5131
+
<dtid=css3-animationstitle=CSS3-ANIMATIONS><aclass=self-linkhref=#css3-animations></a>[CSS3-ANIMATIONS]<dd>Dean Jackson; et al. <ahref=http://www.w3.org/TR/2013/WD-css3-animations-20130219/>CSS Animations</a>. 19 February 2013. W3C Working Draft. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/WD-css3-animations-20130219/>http://www.w3.org/TR/2013/WD-css3-animations-20130219/</a></dd>
5132
+
<dtid=css3-conditionaltitle=CSS3-CONDITIONAL><aclass=self-linkhref=#css3-conditional></a>[CSS3-CONDITIONAL]<dd>L. David Baron. <ahref=http://www.w3.org/TR/2013/CR-css3-conditional-20130404/>CSS Conditional Rules Module Level 3</a>. 4 April 2013. W3C Candidate Recommendation. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2013/CR-css3-conditional-20130404/>http://www.w3.org/TR/2013/CR-css3-conditional-20130404/</a></dd>
5133
+
<dtid=cssomtitle=CSSOM><aclass=self-linkhref=#cssom></a>[CSSOM]<dd>Anne van Kesteren. <ahref=http://www.w3.org/TR/2011/WD-cssom-20110712/>CSSOM</a>. 12 July 2011. W3C Working Draft. (Work in progress.) URL: <ahref=http://www.w3.org/TR/2011/WD-cssom-20110712/>http://www.w3.org/TR/2011/WD-cssom-20110712/</a></dd>
5134
+
<dtid=htmltitle=HTML><aclass=self-linkhref=#html></a>[HTML]<dd>Ian Hickson. <ahref=http://whatwg.org/html>HTML</a>. Living Standard. URL: <ahref=http://whatwg.org/html>http://whatwg.org/html</a></dd>
0 commit comments