Skip to content

Docs: change TOC margin/padding to fix focus outline#37940

Closed
patrickhlauke wants to merge 2 commits intomainfrom
patrickhlauke-outline-subnav
Closed

Docs: change TOC margin/padding to fix focus outline#37940
patrickhlauke wants to merge 2 commits intomainfrom
patrickhlauke-outline-subnav

Conversation

@patrickhlauke
Copy link
Copy Markdown
Member

@patrickhlauke patrickhlauke commented Jan 23, 2023

Description

Slight modification to the TOC styles for the documentation to allow for appropriate space for the default focus outline.

Motivation & Context

Current look of the focus outline in the documentation (not on the live site yet, but in the main branch) - awkwardly cut off at medium and large breakpoints.

medium breakpoint - focus outline cut off left and right

large breakpoint - focus outline cut off on the right


With the PR applied, margin/padding are modified slightly to provide enough space for the default focus outline to show in full.

medium breakpoint - focus outline shown in full

large breakpoint - focus outline shown in full

Live previews

@@ -10,6 +10,10 @@
overflow-y: auto;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the cutoff on the left, only on the right. Given that, wondering if it's simpler to just add padding-right: .125rem; around here? Curious why I'm seeing a different cropping than you though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

different window sizes? let me get a quick screen recording of what i'm seeing...

Copy link
Copy Markdown
Member Author

@patrickhlauke patrickhlauke Jan 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdo here's a before (0:00) and after (0:16) comparison - note how the nav changes both for xl, md, and sm (this change comes from our grid, not from the styles for the subnav). just doing the padding-right fixes it for xl, but not for md (and i didn't add the fix to the left-hand side to xl, as then it makes it overcompensates for the xl sizes)

bootstrap-pr37940-before-after.mp4

one slight annoyance there is the longer link for the "responsive meta tag" which breaks onto two lines...but I personally can live with that at the md size

@patrickhlauke
Copy link
Copy Markdown
Member Author

superseded by #37965

@patrickhlauke patrickhlauke deleted the patrickhlauke-outline-subnav branch January 28, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants