Skip to content

Condensed heading spacing (20px) is larger than the default it claims to shrink #64

Description

@minimaldesign

The rule that tightens the gap when a subheading directly follows a heading contradicts its own comment, and has since before the element-token audit.

The contradiction

In elements.text.css, h1 through h3 get a 16px margin-bottom (--sm1), but the pre-audit comment on the adjacent-subheading rule said:

h1—h3 that has h2—h4 right after gets a smaller margin bottom

while the rule's value was --sm2, which is 20px. So a heading followed by its subheading gets more space below it than a heading followed by body text, the opposite of what the comment promises (and of the usual typographic move, which pulls a subheading closer to its parent heading).

Either the comment was wrong or the value was. The element-interface-tokens branch preserved the behavior exactly, moved the value behind the new --heading-spacing-condensed token (defaulting to --sm2), and neutralized the comment so it no longer claims "smaller".

Options

  • The value was wrong: change the --heading-spacing-condensed default to something actually smaller than the 16px h1-h3 default, e.g. --xs2 (8px) or --xs3 (12px). Visual change on every page with stacked headings.
  • The comment was wrong: keep 20px as the deliberate design and the current neutral comment stands. No change needed beyond closing this issue.

Either way it's a one-line change now: the default lives in settings.ui.css, and any site that disagrees can override the token from a theme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions