Skip to content
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

Unwanted border-bottom on .active nav-tab in Bootstrap 5 #41225

Open
3 tasks done
pbuttelli opened this issue Feb 13, 2025 · 1 comment
Open
3 tasks done

Unwanted border-bottom on .active nav-tab in Bootstrap 5 #41225

pbuttelli opened this issue Feb 13, 2025 · 1 comment
Labels

Comments

@pbuttelli
Copy link

pbuttelli commented Feb 13, 2025

Prerequisites

Describe the issue

Description:
An unexpected border-bottom appears on the active .nav-tabs item in Bootstrap 5. This behavior occurs even in the official documentation examples. The issue seems related to rendering inconsistencies, as slight changes in layout (e.g., padding adjustments) affect the visibility of the border.

Environment:

  • Bootstrap Version: 5.3.3
  • Browser: Firefox 134.0 (64-bit)
  • OS: Ubuntu 20.04

Steps to reproduce:

  • Open a page with Bootstrap 5’s .nav-tabs.
  • Set different padding values on <body>.
  • Observe that the active tab sometimes shows a border-bottom that shouldn’t be there.

Screenshots:

<body> with padding: 4rem
Image

<body> with padding: 2rem
Image

Reduced test cases

Applying margin: 1px 0 to .nav-tabs seems to mitigate the issue:
Image

Possible cause?
This could be a browser rendering quirk, possibly due to subpixel rounding issues affecting how the tab's active state is calculated. It seems to be more noticeable in Firefox on Linux, but further testing is needed to confirm if this affects other environments.

Related issues (previous major versions of Bootstrap):

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

v5.3.3

@pbuttelli
Copy link
Author

An animation of the issue:
Image

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

No branches or pull requests

2 participants