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

Base Presets: CSS var --p-scrollbar-width is not defined #6094

Closed
eneeio-nm opened this issue Jul 22, 2024 · 3 comments
Closed

Base Presets: CSS var --p-scrollbar-width is not defined #6094

eneeio-nm opened this issue Jul 22, 2024 · 3 comments
Assignees
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@eneeio-nm
Copy link
Contributor

eneeio-nm commented Jul 22, 2024

Describe the bug

Since v4 release, when a Dialog is opened, .p-overflow-hidden class is expecting var(--p-scrollbar-width), however --p-scrollbar-width is not being defined. See screenshot from Chrome Devtools below:

Chrome Devtools screenshot
Chrome Devtools screenshot showing CSS var is not defined

This results in the page (when a vertical scrollbar is visible) expanding to the right once the overlay appears. This degrades the UX of v4 over v3.

Note

Whilst this is being reported against v4.0.1 it was also present in v4.0.0

Reproducer

https://primevue.org/dialog/

PrimeVue version

4.0.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to https://primevue.org/dialog/
  2. Select 'Show' button in the first example
  3. Open Devtools
  4. Select body node, under 'Elements' tab
  5. Notice in the 'Styles' tab on the right that --p-scrollbar-width is greyed out and when mouse hovers over it a tooltip is displayed stating it is not defined

Expected behavior

Expectations are the when a Dialog (or similar component that displays a page overlay) is open, the content of the page should not expand to the right (by the width of the browser's scrollbar).

@eneeio-nm eneeio-nm added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 22, 2024
@eneeio-nm
Copy link
Contributor Author

Probably a duplicate of #6089 ?

@murshex
Copy link

murshex commented Aug 28, 2024

Same problem

@mertsincan mertsincan added this to the 4.3.0 milestone Jan 15, 2025
@mertsincan mertsincan self-assigned this Jan 15, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Jan 15, 2025
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 15, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Jan 28, 2025
@mertsincan
Copy link
Member

The scrollbar-width is calculated automatically using the blockBodyScroll method in @primeuix/utils.

Fixed for next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Done
Development

No branches or pull requests

3 participants