[review feedback] qa-css-charset

Hi Richard,
Sorry, I’m a little behind with translating this article. Here come some 
more things:


»»
in values of the content property
««

Mark up as code keyword:
in values of the <code class="kw" translate="no">content</code> property


»»
If the encoding of your HTML and CSS files is not UTF-8, but is the 
same, the browser will use the encoding of the HTML file in the latest 
versions of major browsers.
««

Add ‘also for the style sheet’:
… the browser will use the encoding of the HTML file also for the style 
sheet in the latest versions of major browsers.

Or use ‘apply to’:
… the browser will apply the encoding of the HTML file also to the style 
sheet in the latest versions of major browsers.

With ‘latest versions’ as subject:
… the latest versions of major browsers will apply the encoding of the 
HTML file also to the style sheet.


»»
the <code class="kw" translate="no">@charset</code> element must be set
««

Not an ‘element’:
the <code class="kw" translate="no">@charset</code> declaration must be set

Or short:
<code class="kw" translate="no">@charset</code> must be set


»»
to ascertain what the encoding of the page is.
««

Not a ‘page’:
to ascertain what the encoding of the style sheet is.


»»
You can also declare the encoding of the file in the HTTP <code 
class="kw" translate="no">Content-Type</code> header, if you have access 
to the server settings or if the server serves files with an encoding by 
default.
««

‘You can also declare’ sounds as if you would have the choise. But if 
the server serves files with an encoding by default, you don’t have the 
choise; you *do* declare the encoding.


»»
We recommend that if you use an HTTP declaration, you also include a 
declaration inside the style sheet.
««

Add ‘@charset’:
We recommend that if you use an HTTP declaration, you also include a 
<code class="kw" translate="no">@charset</code> declaration inside the 
style sheet.

This recommendation contraticts the former “If you do that [use UTF-8], 
there is no need to declare the encoding of your style sheet” and “As 
mentioned above, you should only use this [@charset] when style sheets 
and the calling HTML file are in different encodings.”

When you use an HTTP declaration (maybe not by choise, but by default 
server settings), and the encodings of HTML and CSS files are the same, 
should you use @charset or not?


»»
The declaration in the HTTP header will always override the in-document 
declaration, if there is a conflict, except for those browsers where the 
byte-order mark overrides it.
««

BOM overriding HTTP is not the exception; the behavior of Internet 
Explorer 10 and 11 is.

Make it sound like:
The declaration in the HTTP header will always override the in-document 
declaration, if there is a conflict. But the HTTP declaration will be 
overridden by the byte-order mark if there is one, except for Internet 
Explorer 10 and 11.


The precedence is: BOM, HTTP, @charset. The current order of sections in 
‘Details’ is: @charset, BOM, HTTP.

Suggestion: Move the ‘Using @charset’ section to after ‘Using HTTP’.


Cheers,
Gunnar

Received on Sunday, 16 March 2014 06:08:02 UTC