primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
9.84k stars 4.5k forks source link

Upgrade to Primeng v17 #14929

Open modava opened 4 months ago

modava commented 4 months ago

Describe the bug

I have updated Primeng v16 to v17 but ../node_modules/primeng/resources/primeng.min.css do not receive priority. Screenshot 2024-03-02 at 22 56 04

------index.html------------------

Screenshot 2024-03-02 at 22 54 33

-----styles.scss..........................

Screenshot 2024-03-02 at 22 54 58

Environment

/

Reproducer

No response

Angular version

17

PrimeNG version

17

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20.10.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

/

Urtgard commented 4 months ago

In v17 (or some late v16.x) PrimeNG started to use CSS layers. The styles from your theme-blue.css don't use CSS layers. Styles without a layer have always higher specificity than styles with layers.

You could add your theme-blue.css to the primeng layer. Maybe that's the easiest solution.

https://primeng.org/guides/csslayer https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_layers https://www.youtube.com/watch?v=EPRUy0lvgBA