Skip to content

Commit e3e9e8d

Browse files
committed
[css-syntax] <link rel=stylesheet charset=…> turns out to still be supported.
1 parent ffb4387 commit e3e9e8d

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

css-syntax/Overview.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,24 @@ <h4 class="heading settled heading" data-level=3.3.2 id=environment-encoding-htm
453453
HTML</span><a class=self-link href=#environment-encoding-html></a></h4>
454454

455455
<p> For stylesheets referred to by an HTML <a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-stylesheet><code>&lt;link rel=stylesheet&gt;</code></a> element,
456-
the <a data-link-type=dfn href=#environment-encoding0 title="environment encoding">environment encoding</a> is the encoding of the referring document.
456+
the <a data-link-type=dfn href=#environment-encoding0 title="environment encoding">environment encoding</a> is determined as follows:
457+
458+
<p> <ul>
459+
<li>
460+
<a data-link-type=dfn href=#get-an-encoding title="get an encoding">Get an encoding</a> for the value of the <code>charset</code> attribute of the element, if any.
461+
If that does not return failure,
462+
use the return value as the environment encoding.
463+
464+
<li>
465+
Otherwise, use the encoding of the referring document.
466+
</ul>
457467

458468
<p class=note> Note: this should be moved to the HTML spec.
459469

460-
<h4 class="heading settled heading" data-level=3.3.3 id=environment-encoding-xml><span class=secno>3.3.3 </span><span class=content>
470+
<p class=note> Note: Even though the HTML spec marks the <code>charset</code> attribute as obsolete,
471+
implementations still consider it as of this writing (October 2013.)
472+
Should we drop it?
473+
<h4 class="heading settled heading" data-level=3.3.3 id=environment-encoding-xml><span class=secno>3.3.3 </span><span class=content>
461474
XML</span><a class=self-link href=#environment-encoding-xml></a></h4>
462475

463476
<p> For stylesheets referred to by an <a href=http://www.w3.org/TR/xml-stylesheet/#the-xml-stylesheet-processing-instruction><code>xml-stylesheet</code></a> processing instruction <a data-biblio-type=normative data-link-type=biblio href=#xmlstyle title=xmlstyle>[XMLSTYLE]</a>,

css-syntax/Overview.src.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,28 @@ <h4 id="environment-encoding-html">
335335
HTML</h4>
336336

337337
For stylesheets referred to by an HTML <a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-stylesheet><code>&lt;link rel=stylesheet></code></a> element,
338-
the <a>environment encoding</a> is the encoding of the referring document.
338+
the <a>environment encoding</a> is determined as follows:
339+
340+
<ul>
341+
<li>
342+
<a>Get an encoding</a> for the value of the <code>charset</code> attribute of the element, if any.
343+
If that does not return failure,
344+
use the return value as the environment encoding.
345+
346+
<li>
347+
Otherwise, use the encoding of the referring document.
348+
</ul>
339349

340350
Note: this should be moved to the HTML spec.
341351

352+
Note: Even though the HTML spec marks the <code>charset</code> attribute as obsolete,
353+
implementations still consider it as of this writing (October 2013.)
354+
Should we drop it?
355+
<!--
356+
Test case:
357+
data:text/html,<link%20rel=stylesheet%20href=http://test.csswg.org/suites/css2.1/20110323/html4/support/none.css><span%20class=&%23258;&%23733;&%23258;&%23164;&%23258;&%23168>Test
358+
-->
359+
342360
<h4 id="environment-encoding-xml">
343361
XML</h4>
344362

0 commit comments

Comments
 (0)