Open Bug 774098 Opened 12 years ago Updated 2 years ago

<h[2-6]> headers in <hgroup> not styled properly

Categories

(Core :: CSS Parsing and Computation, defect)

14 Branch
defect

Tracking

()

People

(Reporter: GPHemsley, Unassigned)

References

()

Details

(Keywords: html5)

Attachments

(2 files)

AIUI, the HTML(5| Living) standard makes <hgroup> available to allow multiple levels of header (i.e. <h1> through <h6>) to count as a single header for a section. It also allows <h1> to serve as the header for each embedded section, and expects the style to become smaller to indicate as such.

However, when combined, I expect that embedded non-<h1> are also made smaller relative to the headers in their containing block. But it seems they are instead styled relative to the page. Among other things, this results in an <h2> header within an <hgroup> to be smaller than an <h1> within that same <hgroup>.

A testcase is in the URL field. In this testcase, the "inner section secondary header" is larger than the "inner section primary header", whereas I would expect it to be smaller.
The rendering section in the spec doesn't seem to define anything of the kind... Can you file a spec bug?
(In reply to :Ms2ger from comment #1)
> The rendering section in the spec doesn't seem to define anything of the
> kind... Can you file a spec bug?

Sure... where can I do that?
(In reply to Boris Zbarsky (:bz) from comment #3)
> https://www.w3.org/Bugs/Public/enter_bug.
> cgi?product=HTML%20WG&component=HTML5%20spec

Thanks. I always have trouble juggling the difference between the W3C and WHATWG versions.

I filed this:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17787
Attached file Extended testcase
This is an extended testcase that demonstrates the exhaustive embedding of <hN> headers.
Attached file Proposed CSS
Here's some CSS that would do what I have in mind.

Note: I don't know how the HTML spec decided the font-size and margin values, so the last definition is one I made up. (It is intended to represent the equivalent of a hypothetical <h7>.)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: