edwardtufte / tufte-css

Style your webpage like Edward Tufte’s handouts.
https://edwardtufte.github.io/tufte-css/
MIT License
5.99k stars 459 forks source link

Remove charset from css file #110

Closed gheoan closed 8 years ago

gheoan commented 8 years ago

A charset is already defined in index.html#L4.

If you do that, there is no need to declare the encoding of your style sheet. —https://www.w3.org/International/questions/qa-css-charset#quickanswer

jez commented 8 years ago

There may be no need, but the tufte.css file can be thought of as an API. People already use it expecting that the charset will be defined there.

Would it maybe make more sense to remove the charset from the index.html file instead?

gheoan commented 8 years ago

In that case, this change is breaking. Users of the API should be notified of the change and automatic update should not happen.

The charset in the html document is required by the html standard: https://html.spec.whatwg.org/multipage/semantics.html#charset.

daveliepmann commented 8 years ago

Of the two, tufte.css is the file that ships. index.html is merely a demonstration document, and so we can't rely on it defining character sets when Tufte CSS is used.

My inclination is to keep both, or go with the suggestion from @jez and remove from index.html.

daveliepmann commented 8 years ago

Sorry—did not see the second comment from @Gheoan.

I amend my prior post: keep both. There may be "no need" to specify the charset in both, but it harms nothing. Unless a positive argument is made for this "breaking change" it doesn't seem warranted.

gheoan commented 8 years ago

As it has been mentioned, index.html is intended to be a demonstration and it is not guarantee that the document in which tufte.css is embedded specifies the character set.

I would have suggested moving the @charset declaration at the top of the file but I see that has already been taken care of in https://github.com/edwardtufte/tufte-css/commit/f0019b9d2a56950da0ba610b79b1051542fa26f9.