normalize-opentype.css icon indicating copy to clipboard operation
normalize-opentype.css copied to clipboard

Why addressing html *and* body?

Open isellsoap opened this issue 11 years ago • 3 comments

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?

isellsoap avatar Aug 29 '14 12:08 isellsoap

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!

kennethormandy avatar Sep 17 '14 21:09 kennethormandy

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

kpeatt avatar Sep 18 '14 01:09 kpeatt

@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. :-)

isellsoap avatar Sep 18 '14 07:09 isellsoap