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

Scrollable tabs wrongly styled #17791

Open
1 of 4 tasks
majkers opened this issue Feb 28, 2025 · 0 comments
Open
1 of 4 tasks

Scrollable tabs wrongly styled #17791

majkers opened this issue Feb 28, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@majkers
Copy link
Contributor

majkers commented Feb 28, 2025

Describe the bug

When we use scrollable tabs styles are added to :

.p-tablist-tab-list {
    position: relative;
    display: flex;
    background: ${dt('tabs.tablist.background')};
    border-style: solid;
    border-color: ${dt('tabs.tablist.border.color')};
    border-width: ${dt('tabs.tablist.border.width')};
}

but when we scroll it, this div is not visible and all the styles are gone... IMHO one of parents of this div ie. the one with classes:

p-tablist-content p-tablist-viewport

should have tokens too.

Have a look at demo:

I set var --p-tabs-tablist-background to red. And initially it is ok

Image

but after scrolling to right red background is gone:

Image

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://primeng.org/tabs

Environment

Primeng demo page

Angular version

19.1.7

PrimeNG version

v19

Node version

n/a

Browser(s)

all

Steps to reproduce the behavior

  1. Go to https://primeng.org/tabs
  2. Go to scrollable section
  3. Change var --p-tabs-tablist-background to red eg
  4. Scroll tabs to right

Expected behavior

Background should stay red

@majkers majkers added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant