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

Component Styles: Remove use of !important now that @layer is used #5096

Closed
FlipWarthog opened this issue Oct 14, 2023 · 0 comments · Fixed by #5097
Closed

Component Styles: Remove use of !important now that @layer is used #5096

FlipWarthog opened this issue Oct 14, 2023 · 0 comments · Fixed by #5097
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@FlipWarthog
Copy link
Contributor

FlipWarthog commented Oct 14, 2023

Describe the bug

See this guide for more detailed info, but with the use of @layer in the component CSS, any use of !important now has a bunch of extra weight to it, because of how !important is resolved. The below sample shows a basic example a user saw where they expected their app style to override the lib style, which it didn't. So they needed to resort to adding their own @layer primevue to resolve the conflict.

https://stackblitz.com/edit/jwh1eh?file=src%2FApp.vue,src%2Fstyle.css

Reproducer

No response

PrimeReact version

10.0.3

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

App styles shouldn't require reimplementing the library @layer to work.

@FlipWarthog FlipWarthog added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 14, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 15, 2023
@melloware melloware added this to the 10.0.4 milestone Oct 15, 2023
@mertsincan mertsincan modified the milestones: 10.0.4, 10.0.5 Oct 19, 2023
@habubey habubey modified the milestones: 10.0.6, 10.0.7, 10.0.8, 10.0.9 Oct 26, 2023
melloware added a commit that referenced this issue Nov 10, 2023
…is used (#5097)

* Remove !important from component CSS

* Add back important on Dialog maximize

* Update SidebarBase.js

---------

Co-authored-by: Melloware <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
4 participants