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

fix(tabs): Bottom border of .p-tabs__list spans full width on all screen sizes #5457

Merged

Conversation

jmuzina
Copy link
Member

@jmuzina jmuzina commented Jan 23, 2025

Done

Adjusts the border of the p-tabs__list so that it spans full width on all screen sizes.
Previously, a pseudoelement .p-tabs__list::after was used as a pseudo-border, but this pseudo-border spanned the width of .p-tabs__list, which is a horizontally scrolling flex container. So, the border spans the constrained width of the container, not the width of the list itself.

This alters the border to use an inset box shadow, basing the border sizing off of the box model of p-tabs__list instead. This correctly forces the bottom border to span the full width of the tabs list on all screen sizes.

Fixes #5446
Fixes WD-18333

QA

  • Open tab variants and verify the bottom border of the tabs list spans the full width of the body on all screen sizes, especially when the screen is small enough to cause the tabs list to scroll horizontally. Make sure you scroll to the right as well.

Check if PR is ready for release

If this PR contains Vanilla SCSS or macro code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention
    • if existing APIs (CSS classes & macro APIs) are not changed it can be a bugfix release (x.x.X)
    • if existing APIs (CSS classes & macro APIs) are changed/added/removed it should be a minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) or macros should be listed on the what's new page.

Screenshots

Tabbed content

Before

image

After

image

Docs

Before

image

After

image

@webteam-app
Copy link

@jmuzina jmuzina added the Review: Percy needed This PR needs a review of Percy for visual regressions label Jan 23, 2025
Copy link
Contributor

@petesfrench petesfrench left a comment

Choose a reason for hiding this comment

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

LGTM

@jmuzina jmuzina merged commit fa37ab5 into canonical:main Jan 24, 2025
16 checks passed
@jmuzina jmuzina deleted the WD-18333-fix-tabs-border-span-full-width branch January 24, 2025 15:19
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.

[Bug]: Horizontal line under p-tabs tabs doesn't span full width on smaller screens
4 participants