Skip to content

Increase size of h6 class to more clearly be a heading #41417

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

Closed
2 tasks done
willfaught opened this issue Apr 29, 2025 · 6 comments
Closed
2 tasks done

Increase size of h6 class to more clearly be a heading #41417

willfaught opened this issue Apr 29, 2025 · 6 comments

Comments

@willfaught
Copy link

willfaught commented Apr 29, 2025

Prerequisites

Proposal

When used as the only heading level in a page, the h6 class appears to be just another paragraph. This causes confusion. Perhaps it would be less surprising if the h6 class appeared bigger than paragraph text.

Motivation and context

See willfaught/paige#104

@willfaught willfaught changed the title Increase size of h6 to more clearly be a heading Increase size of h6 class to more clearly be a heading Apr 29, 2025
@mdo
Copy link
Member

mdo commented Apr 29, 2025

The browser defaults are even smaller fwiw. Unsure how much I want to revisit here, but maybe a 1.125rem in like v5.4.0 or later at best?

Image

@Jackkk123
Copy link

To enhance the visual hierarchy while maintaining the Bootstrap design system, I suggest:

  1. Increasing h6 font-size from 0.85rem to 1.125rem
  2. Adding slight font-weight enhancement (500 or semi-bold)
  3. Implementing complementary margin adjustments to maintain vertical rhythm

@dailytabs
Copy link

dailytabs commented May 10, 2025

I disagree. Having the final heading being the same as normal text is very common. IAC, should be using fs-* and customizing them. Additionally, changing this in a .x does not sound like a good idea.

@julien-deramond
Copy link
Member

I’m not surprised by the current Bootstrap rendering, but I don’t have a particularly strong opinion on it either.

Bootstrap already provides a solid set of utilities and customization options that make it easy to override default styles. Developers can apply custom classes, use utility classes for things like spacing or text styling, and even redefine Sass variables to ensure consistent, project-specific designs.

That said, in some tools or plugins, Bootstrap’s CSS may be applied automatically to Markdown content without an easy way to override the rendering. In those cases, it’s important that headers have some visual distinction from normal text. Font size is one option, but not the only one—other styling cues like boldness, color, or spacing can also help. Interestingly, if I remember correctly, in tools like Microsoft Word, the equivalent of <h6> is sometimes smaller than body text, but is still visually distinct thanks to its different texture or style.

However, IMHO, if any changes were to be made to the default header styling, they should be introduced in a major version update. Headers and their related utilities are deeply integrated into many existing projects, and modifying them could cause widespread issues. Even with Bootstrap’s flexibility, changing default behavior can lead to unexpected side effects or require significant effort to adapt.

For context, here’s how Markdown rendered with Primer styles looks:


# h1
Normal text

## h2
Normal text

### h3
Normal text

#### h4
Normal text

##### h5
Normal text

###### h6
Normal text

h1

Normal text

h2

Normal text

h3

Normal text

h4

Normal text

h5

Normal text

h6

Normal text

@mdo
Copy link
Member

mdo commented May 19, 2025

Closing for now, we can revisit in v6 if we want.

@mdo mdo closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2025
@willfaught
Copy link
Author

@mdo Why not move this to a v6 milestone instead of closing it? I see you’re working on v6 right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants