-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
New @layer
implementation
#4504
Comments
This indeed IS a breaking change! Custom CSS styles declared outside of a layer will override styles declared in a layer, regardless of specificity! |
This is very frustrating. As @riskysciolism mentioned, this IS a breaking change! The use of PrimeVue with Bootstrap 4 is broken after this update as Bootstrap 4 does not use layers. |
This is a breaking change for our team too, would've been nice to see that immediately |
From my point of view, this is also a breaking change that can have significant impacts on the organization of styling. Unfortunately, the change affects us as well. In our case, the border-radius in p-buttonset is no longer overwritten, as our previous implementation defined a general border-radius outside of a layer. |
Hi How is this new feature implemented? @tugcekucukoglu @cagataycivici |
For those of us forced to support older browsers (my customer uses Chrome 79... don't ask why, just accept that they are waaay behind the times) this is a breaking change that took me the last two days to track down. Would be great if there was a way to toggle whether we want to use this feature or not. |
Please roll this back. This lowers specificity below any styles that are declared globally. This means that if, for example, someone has a "normalize" stylesheet that sets a An existing Bootstrap or normalize CSS will override anything now defined in PrimeVue's CSS. |
Note that even if the PrimeVue team is committed to |
@tugcekucukoglu Do you have any response to these comments? |
The |
Same for my team regarding the |
The @layer implementation is also breaking our code - we are using PrimeVue inside an app which needs to support Android 6.0. and Android System WebView (Chromium 95 based). As @layer is only supported from version Chrome 99, our app completely broke after minor PrimeVue update from 3.29 -> 3.47. Can this be somehow turned off? |
Any way to turn that off? Why are all complains ignored? |
For those who are still struggling. We solved our problem by explicitly assigning a layer to our own CSS styles and defining the order of the layers. I know this is annoying, but it solves the problem of overwriting. What bothers me is that this is still not marked as a breaking change.
|
@riskysciolism Yes, that's ultimately what I did as well. The thing about the So that's what I did. I wrapped any normalization or reset styles, custom styles, or just app specific styles in layers, and set the layer order. At the end of the day, once I figured it out, it wasn't necessarily that much work, but:
The fact that PrimeVue developers didn't do the above means they probably didn't fully understand |
I’m so glad I found this thread. It broke my mind why everything all of a sudden started being super-ugly whenever I update. (For the record, the last normally working version for me was 3.43.0.) I still haven’t figured out how to fix this, but hopefully this thread will help. It’s mind-boggling how the team decided to make this a “minor” release. |
Adding another +1 to hopefully help highlight that this a BREAKING CHANGE, and there's nearly no documentation on it. Thanks to @matthew-dean and @riskysciolism for the comments regarding wrapping everything in It's wild that a minor version update completely breaks the styles for this many people, and there's not even a hit of the possibility. It's hard to consider using primevue in the future when things like this happen. |
I had to rollback to previous version. I use bootstrap 4 and it breaks everything. I tried to set my reset.css in @layer, tried many solutions, lost a lot of time with it |
@FVolral If you have questions about this, let me know! I joined the PrimeFaces Discord, so you should be able to message me in there? 🤔 (I don't use DIscord very much, so I'm not sure.) In short, though, if you wrap everything, and I mean everything, in a |
@matthew-dean I finally managed to make it works. To do so, I had to migrate from Vue CLI to Vite in order to get rid of WebPack, which was generating a bundle that messed up the cascade layer order when in production. |
As a preliminary information and possible relief, it looks like CSS layers will be optional as of version 4. Take this with a grain of salt as I have not yet tested this and as version 4 is still in beta, this may of course still change. |
Can we remove it from v3 since it is becoming a feature in v4? |
Let's stop being polite: primevue css developers are incompetent and they didn't see this coming. If there's an easy-to-adopt fix, can someone explain it better? |
@dsldiesel I disagree. If the CSS developers of PrimeVue are incompetent, then why are you using their libraries? I've been in the same situation as you. Yes, it's time-consuming. Like you, I had to go back over a good portion of my application's interface to fix issues. But I also know that if I hadn't used any library at all, I would have wasted a crazy amount of time reinventing the wheel. This kind of event is the price to pay, and you're paying it for free. Don't be stingy. It's a breaking change, so there isn't really an 'easy way.' In the documentation, a few keys are given to solve this problem: putting the CSS reset in a layer, playing with the layer order: https://primevue.org/csslayer/. As mentioned earlier, if you're using vue-cli, you'll probably have to migrate to Vite.js. You'll have to make this migration sooner or later anyway because the vue-cli documentation itself recommends migrating to Vite. |
So bad.. anyone found a workaround around this? |
|
Thanks @FVolral! But this will still be broken on Safari < 15.4 :( |
why are you using a so old version of safari ? |
No description provided.
The text was updated successfully, but these errors were encountered: