A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

CSS in <body>: Spec vs practice

Thomas_Guttler
2021-09-11

AFAIK up to now the only way to define CSS Rule is in the tag.

But the daily practice looks quite different. For example amazon.com has several css rules defined in the .

If the spec and the practice is so different, then this should be fixed.

I guess it is impossible to convince all these sites which use CSS in to obey the spec.

For me the only feasible solution is to change the spec. But maybe there are better solutions.

What do you think?

Related question on Stackoverflow html - How can I insert CSS styles inside <body> independent of specific elements? - Stack Overflow

simevidas
2021-09-12

The HTML tags in your post were automatically removed because you didn’t wrap them in backticks. For example, you need to write

`<head>`

to get <head> included in our text.

Thomas_Guttler
2021-09-12

Thank you for the hint.

Is there no way to update or delete a post?

simevidas
2021-09-12

Look for a pencil icon button in the bottom right corner of your original post. If it’s not there, then editing rights must have been revoked. I’m not sure why that would happen. Maybe it’s only possible to edit posts a short time after posting them.

Thomas_Guttler
2021-09-16

Thank you Šime Vidas.

I don’t have this “edit” icon. I even can’t delete my post.

I created the question again in a new post: CSS in <body>: How to align spec and practice in the future?