New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<h1> heading semantics #33
Comments
Ooh, I didn't know that! Thanks. |
In an article should an h2 be smaller than an h1? |
This is what Chrome renders: Font size of But one way or another, I guess the best approach is not touching |
http://scratchpad.io/numberless-flock-8487 For reference, Chrome uses these default styles for the example above:
|
Yup, though it doesn't stop there – you can nest all the way down until |
Seems like the best course of action is to set a root font size and let browsers set the correct heading sizes. This would probably require some cross browser testing to make sure that most browsers set some reasonable defaults in both the nested and non-nested cases. |
Browsers don’t support the document outline algorithm. Plus it's not great for accessibility to have more than one Read more here: http://adrianroselli.com/2013/12/the-truth-about-truth-about-multiple-h1.html |
Huh, you're right! That's too bad – so HTML has no way of writing reusable markup without ruining semantics? 😶 This article on CSS tricks gives a great overview over the whole problem: |
@jonaskuske @philsherry I'm finally jumping in the conversation - are you suggesting it's probably not very semantic to have multiple |
@kognise Short answer: yes. Longer answer: yes, because we're in the education business and shouldn't make allowances for people doing the wrong thing. If schooled correctly, the correct behaviour will (hopefully) prevail. |
And now I'm educated 😄 |
Yep, whether or not this stylesheet should actively educate its users is the question here 😅
and
...are both valid stances imo. But I'm fine with either, so close if you want. 👍🏻 |
I'm gonna be bold and go for the second 👌 It's almost always similar - if enough people encourage best practices or use a new standard browsers will change to support it. Although Water.css isn't such a big player yet, we can at least start. Thank you! |
@jonaskuske @kognise How does this philosophy play with vendor prefixes for vendor specific features? For example, styling scrollbars doesn't have an official specification yet. I do like choosing the second option though! We've got a lot of semantic HTML contributors. |
While it's no final spec yet, there is a Working Draft for scrollbar styling and it's implemented in Firefox already. Other than that, I don't know of a good CSS-only way to style scrollbars, anyhow:
But if you want to discuss scrollbar styling further, we should probably make that a separate issue? |
There's already a separate issue for scrollbars (#14) but I'm more concerned with the general case of vendor specific features. The scrollbars are just one example. What should be our stance for when a vendor implements a new feature without it being in Working Draft or Spec? I'm only finding selectors (eg. -webkit-text-stroke) that are non-standard and vendor specific, so I can't find another great example, but I'm sure there's some out there. |
Styling for
<h1>
headings is currently broken, as all<h1>
headings are forced to have the same font size.HTML allows you to have multiple
<h1>
elements on a page¹, with one being the main site title and the others being nested e.g. inside<article>
elements and acting as the main title for the respective article.Browsers respect this and display nested
<h1>
elements smaller than the main one, butwater.css
breaks this because it forces all<h1>
elements to have the samefont-size
.¹ The Document Outline as intended by HTML5 – but while browsers visually adhere to it by scaling down
<h1>
elements, they don't implement the Outline algorithm on a semantic level, unfortunately.The text was updated successfully, but these errors were encountered: