kennethormandy / normalize-opentype.css

Adds OpenType features—ligatures, kerning, and more—to Normalize.css.
http://kennethormandy.com/journal/normalize-opentype-css
MIT License
791 stars 29 forks source link

Why addressing html *and* body? #14

Open isellsoap opened 10 years ago

isellsoap commented 10 years ago

Why do you address both the html and the body element for the root styles? Shouldn’t it be sufficient specifying just one of them?

kennethormandy commented 9 years ago

Hey, thanks for opening an issue. It’s possible (though unlikely) that something may exist outside the body, so I’ve been in the habit of always addressing both:

<!-- … -->
</head>
<pre>Error: something might show up here</pre>
<body>
<h1>Hello, world</h1>
<!-- … -->

It’s also more relevant in this project since the font-feature-settings styles might not cascade as expected.

If it’s causing problems for you, please let me know and I’d be happy to address it!

kpeatt commented 9 years ago

@kennethormandy Wouldn't html capture both in that situation? Why address the two?

isellsoap commented 9 years ago

@kennethormandy You first example is invalid HTML. Why would you want to target such invalid use cases? If someone writes such markup they don’t deserve to be blessed with opentype features. :-)