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

CSS variable mismatch with PrimeVue 4.x #230

Open
garethjamesmoneyalive opened this issue Jul 10, 2024 · 6 comments
Open

CSS variable mismatch with PrimeVue 4.x #230

garethjamesmoneyalive opened this issue Jul 10, 2024 · 6 comments

Comments

@garethjamesmoneyalive
Copy link

CSS color variable names have changed in PrimeVue 4.x so there's currently a mismatch.

The class text-red-500 currently uses:

.text-red-500 {
    color: var(--red-500) !important;
}

This is fine with PrimeVue 3.x but as of 4.x the CSS variable is prefixed and needs the value --p-red-500.

@DotoPototo
Copy link

It looks like primeflex is no longer going to be maintained which they mention here

They also mention a tool to help move from primeflex to tailwind CSS.

@cricketthomas
Copy link

This should be pinned. We just moved everything to primeflex 😞 and now its just not going to work with primevue v4.

@asokr
Copy link

asokr commented Jul 30, 2024

This should be pinned. We just moved everything to primeflex 😞 and now its just not going to work with primevue v4.

Try to remove prefix in app init

app.use(PrimeVue, {
    theme: {
        preset: Lara,
        options: {
            prefix: "",
        },
    },
});

@abdell1999
Copy link

If you are using Nuxt, the solution proposed by asokr also works, you just add the prefix to the export of the theme
export default { preset: MyPreset, options: { darkModeSelector: ".p-dark", prefix: "", }, };

This is a temporary solution, it would be best to migrate to what will be supported. All the best.

@AmmarMohamadIsmaeel
Copy link

This is so frustrating!!! :(

@docentYT
Copy link

Same problem with PrimeNg.

border-round also uses wrong class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants