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
<p> The <aclass=cssdata-link-type=maybehref=#at-ruledef-charsettitle=@charset>@charset</a> rule has <strong>no effect on a stylesheet</strong>.
4492
4492
4493
-
<pclass=note> Note: However, the algorithm to <adata-link-type=dfnhref=#determine-the-fallback-encodingtitle="determine the fallback encoding">determine the fallback encoding</a>
4494
-
looks at the first several bytes of the stylesheet
4495
-
to see if they’re a match for the ASCII characters <code>@charset "XXX";</code>,
4496
-
where XXX is a sequence of bytes other than 22 (ASCII for <code>"</code>).
4497
-
While this resembles an <aclass=cssdata-link-type=maybehref=#at-ruledef-charsettitle=@charset>@charset</a> rule,
4498
-
it’s not actually the same thing.
4499
-
For example, the necessary sequence of bytes will spell out something entirely different
4500
-
if the stylesheet is in an encoding that’s not ASCII-compatible,
4501
-
such as UTF-16.
4493
+
<divclass=note>
4494
+
Note: This only applies to the <adata-link-type=dfnhref=#at-ruletitle=at-rule>at-rule</a>
4495
+
created by the algorithm to <adata-link-type=dfnhref=#parse-a-stylesheet0title="parse a stylesheet">parse a stylesheet</a>,
4496
+
not to the ASCII <code>@charset "XXX";</code> byte sequence
4497
+
that the algorithm to <adata-link-type=dfnhref=#determine-the-fallback-encodingtitle="determine the fallback encoding">determine the fallback encoding</a>
4498
+
looks for at the beginning of a stylesheet.
4499
+
4500
+
<p> While they look similar, they are not actually the same thing.
4501
+
For example, a slightly different byte sequence
4502
+
(more whitespace, single instead of double quotes, …)
4503
+
will not be considered for the fallback encoding
4504
+
but may still generate an <aclass=cssdata-link-type=maybehref=#at-ruledef-charsettitle=@charset>@charset</a> rule that shows up in <adata-biblio-type=informativedata-link-type=bibliohref=#cssomtitle=cssom>[CSSOM]</a>.
0 commit comments