-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PrimeVue v4 styled mode doesn't work with Tailwind as documented #5762
Comments
It looks like it works when I change from |
At least in beta 1 (haven't tried it with the latest one yet) you could also specify the order directly in the configuration. It is not documented however, so I don't know if it will stay this way:
|
I think the key question I'm asking is about consistency between the public documentation and the actual solution. Hope this can be fixed soon in the coming RC1 release. |
when using cssLayer: true, you can check developer tools, you will find the layer name is primeui, consistency is the problem. |
Here is what I found:
|
Here is what I found in the code: if (cssLayer) {
var order = themes.SharedUtils.object.getItemValue(cssLayer.order || 'primeui', params);
return "@layer ".concat(order);
} Maybe the solution is not to add a default |
Describe the bug
According to the v4 document, if I want to use the styled mode with Tailwind CSS, I need to first turn on the cssLayer option:
Then create a css file (
./assets/style.css
) arranging the layer order:However, with this setup, when I experiment a simple page, the styles turn out to come all from Tailwind preflight including the button instead of PrimeVue:
I tried adjusting the order of importing the css file in
main.ts
:as well as
but neither works.
Reproducer
https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template
PrimeVue version
4.0.0-beta3
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
./assets/style.css
:main.ts
:App.vue
:Expected behavior
The heading and paragraph should be rendered in Tailwind CSS preflight, and the button should be rendered in PrimeVue Aura theme.
The text was updated successfully, but these errors were encountered: