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

Installation: deprecating primereact.min.css in favour of just the theme CSS file is making several components lose their formatting #5113

Closed
kabalan-datapostie opened this issue Oct 18, 2023 · 6 comments
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version

Comments

@kabalan-datapostie
Copy link

Describe the bug

We recently upgraded from 9.x to 10.0.3, where we noticed that the core primereact.min.css file is deprecated.

The installation documentation on https://primereact.org/installation/#styles implies that we now only need to import the theme CSS file in v10.

However, there were several core classes in the core primereact.min.css that are not included in v10, which is breaking the layout of our web app in the upgrade.

Are we missing a step in the installation in v10?

Reproducer

No response

PrimeReact version

10.0.3

React version

18.x

Language

ES6

Build / Runtime

Next.js

Browser(s)

Chrome 118

Steps to reproduce the behavior

No response

Expected behavior

Our page (aka the CSS classes) should look the same if we are 1) importing both the core and theme CSS files in v9.x or 2) importing just the theme file in v10.x

@kabalan-datapostie kabalan-datapostie 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 18, 2023
@melloware
Copy link
Member

Which theme are you using?

@kabalan-datapostie
Copy link
Author

import "primereact/resources/themes/mdc-light-indigo/theme.css";

@melloware
Copy link
Member

Hmm the reproducer is still including it: https://stackblitz.com/edit/react-izzqms?file=src%2Findex.js

I wonder if its incorrect docs?

Because they are adding import 'primereact/resources/primereact.css'; // core css

@melloware melloware added Component: Documentation Issue or pull request is related to Documentation 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 18, 2023
@kabalan-datapostie
Copy link
Author

I don't think it's a docs issue. Even if the docs are updated to include it, primereact/resources/primereact.css is now (in 10.x) a blank file with a comment saying it's deprecated, so we still don't get the useful CSS classes it had in 9.x.

@melloware
Copy link
Member

Ahhh got it. Can you tweak my reproducer to show your issue of something that is missing?

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Component: Documentation Issue or pull request is related to Documentation labels Oct 18, 2023
@kabalan-datapostie
Copy link
Author

Playing around with the reproducer and our app, I'm beginning to suspect the issue isn't with PrimeReact, but rather with Next.js and the order in which our different CSS files get imported. See vercel/next.js#16630.

Closing this issue for now, will re-open if we find the issue is on the PrimeReact side.

Thank you @melloware for your help!

@kabalan-datapostie kabalan-datapostie closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@melloware melloware added Resolution: Invalid Issue or pull request is not valid in the latest version and removed Type: Bug Issue contains a defect related to a specific component. labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Invalid Issue or pull request is not valid in the latest version
Projects
None yet
Development

No branches or pull requests

2 participants