Hacker News new | ask | show | jobs
by rangerpolitic 2548 days ago
The new approaches to HTML/CSS run directly counter to the specs sometimes.

Take Bulma for example. They provide styles for titles and subtitles, but their examples use h1 elements.

See: https://bulma.io/documentation/elements/title/

Why is that a problem?

This is explicitly addressed in the HTML 5.2 specification.

> h1–h6 elements must not be used to markup subheadings, subtitles, alternative titles and taglines unless intended to be the heading for a new section or subsection.

See: https://www.w3.org/TR/html52/sections.html#headings-and-sect...

As the author suggests, they don't understand the tools they're using.

2 comments

I'm not a fan of bulma, but that is not a valid complaint. If you give a `h3` the class `title is-1` it will look like their example `h1`. If you add a `h1` without any classes it won't even have any of the styling of `title is-1` unless you add the classes.

If anything they are purposely decoupling the styling from the semantics to make it more obvious which one you are choosing (although the example could make this more clear).

Or perhaps the spec is out of touch with reality...