loading...

Discussion on: CSS Variables Cheat Sheet

Collapse
melnik909 profile image
Stas Melnikov

Nice post. But you can't use the main element inside of the article element. The spec says: "A hierarchically correct main element is one whose ancestor elements are limited to html, body, div, form without an accessible name, and autonomous custom elements. Each main element must be a hierarchically correct main element."

html.spec.whatwg.org/multipage/gro...

Please update your example. Thank you

Collapse
proticm profile image
Milos Protic Author

Hi, glad you liked it.

I have this information in my head, not sure from where, but back when HTML5 was released the main element was allowed inside article, or not? The idea was that each article could have its header, main and footer section...I wasn't aware of this update...if it was an update in the first place :)

If the main element wasn't allowed inside the article element from the very beginning, thank you for clearing this out...I had the wrong information.

I've updated the article.

Collapse
melnik909 profile image
Stas Melnikov

I think that it was from the beginning because the main element always contained unique content. Thank you!