Skip to content

Adjust vertical padding and border width for navbar-nav links#42158

Merged
mdo merged 6 commits into
twbs:v6-devfrom
pricop:patch-8
Mar 12, 2026
Merged

Adjust vertical padding and border width for navbar-nav links#42158
mdo merged 6 commits into
twbs:v6-devfrom
pricop:patch-8

Conversation

@pricop

@pricop pricop commented Mar 12, 2026

Copy link
Copy Markdown

Currently, nav-link paddings on navbar-nav is set to .5rem which computes to a 40px in height, making them larger other common elements, such as input, or button elements.

This issue is clearly visible in the docs demo:

image

This fix normalizes the nav-link height to match the button and input height, by setting the padding to .375rem, and adding an invisible border around them so that they compute to 38px in height.

The navbar-nav links now look like this, which makes the inline input & button align vertically as it should:

image

Adjust vertical padding and border width for nav links
@pricop pricop requested a review from a team as a code owner March 12, 2026 03:48
@pricop pricop changed the title Adjust vertical padding and border width for nav links Adjust vertical padding and border width for navbar-nav links Mar 12, 2026
Comment thread scss/_navbar.scss Outdated
@mdo mdo added this to v6.0.0 Mar 12, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Mar 12, 2026
pricop and others added 5 commits March 12, 2026 21:26
Co-authored-by: Mark Otto <markdotto@gmail.com>
Added support for an optional border-color
Used , instead of ;
@mdo mdo merged commit 6f0bdf6 into twbs:v6-dev Mar 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants