Skip to content

Fix headings styles in hint block #3497

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

Merged
merged 4 commits into from
Jul 23, 2025

Conversation

clairechabas
Copy link
Member

@clairechabas clairechabas commented Jul 23, 2025

The break-words property is set on the hint content container which works for paragraphs but doesn't work for headings because headings include 2 children: the heading text and their hash link button.

Fix:

  • Updates heading block to break-words so a heading always adapts to its container's width.
  • Adapts hint blocks heading right padding to leave enough room for the hash link button in multiple lines headings.
  • Fix heading container width to spread on the full-width of the hint block.

Preview

2 hints with headings of different lengths
Screenshot 2025-07-23 at 15 01 47

hint heading hash button for multiple lines headings
Screenshot 2025-07-23 at 13 00 06

hint heading hash button for a single line heading
Screenshot 2025-07-23 at 15 03 43

Copy link

linear bot commented Jul 23, 2025

Copy link

changeset-bot bot commented Jul 23, 2025

🦋 Changeset detected

Latest commit: 2282178

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

argos-ci bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) ✅ No changes detected - Jul 23, 2025, 1:23 PM
v2-cloudflare (Inspect) ✅ No changes detected - Jul 23, 2025, 1:29 PM
v2-vercel (Inspect) ✅ No changes detected - Jul 23, 2025, 1:28 PM

@gregberge
Copy link
Contributor

@clairechabas ask @zenoachtig if the heading should be full-width or not.

@clairechabas
Copy link
Member Author

@gregberge I checked our docs for this because I wasn't sure either, and it's not full-width there (see here). So it looks to be by design.
But @zenoachtig if you'd rather change it let me know.

@zenoachtig
Copy link
Contributor

@gregberge I checked our docs for this because I wasn't sure either, and it's not full-width there (see here). So it looks to be by design. But @zenoachtig if you'd rather change it let me know.

Oh no that looks like a bug – the heading "bar" should span the complete width!

@gregberge
Copy link
Contributor

@zenoachtig @clairechabas That's what I thought, @Claire can you fix it at the same time?

@clairechabas
Copy link
Member Author

Yep it's fixed 👍 Thanks for confirming @zenoachtig!

@clairechabas clairechabas changed the title Fix headings overflowing in hint block Fix headings styles in hint block Jul 23, 2025
@clairechabas clairechabas merged commit 2ba7e54 into main Jul 23, 2025
16 checks passed
@clairechabas clairechabas deleted the claire/RND-7705-fix-hint-heading-overflow branch July 23, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants