Cannot apply unknown utility class bg-primary
#3941
Unanswered
Kens-Jaswal
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Can you please share a minimal reproduction link where I can tun the project and see the issue? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone,
kindly do help me on this, its humble request...am stuck in between.
daisyui": "^5.0.38",
"tailwindcss": "^4.1.7",
"svelte": "^5.33.4",
Migrate project to latest version of above packages, after using "npm run build" getting below error, its denied to bg-primary class....kindly help what to do...... 🙏
Error: Cannot apply unknown utility class
bg-primary
. Are you using CSS modules or similar and missing@reference
? https://tailwindcss.com/docs/functions-and-directives#reference-directive________________________ app.css
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import 'tailwindcss';
/* below line is required to activate dark-theme as a css selector */
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
@config "../tailwind.config.js";
@plugin "daisyui";
@plugin "daisyui/theme" {
name: 'light';
default: false; /* set as default /
prefersdark: true; / set as default dark mode (prefers-color-scheme:dark) */
}
[data-theme='dark'] {
--color-primary: oklch(0.6769 0.1477 238.31);
--color-primary-content: oklch(0.8557 0.0224 226.18);
}
@theme {
--font-roboto: 'Roboto', sans-serif;
--font-family: 'Roboto', sans-serif;
/--font-sans: 'Roboto', 'Arial', 'sans-serif';/
--text-xs: 0.625rem;
--text-xs--line-height: calc(1 / 0.625);
--text-sm: 0.75rem;
--text-sm--line-height: calc(1.25 / 0.75);
--text-base: 0.875rem;
--text-base--line-height: calc(1.5 / 0.875);
--text-lg: 1rem;
--text-lg--line-height: calc(1.75 / 1);
--text-xl: 1.25rem;
--text-xl--line-height: calc(1.75 / 1.25);
--text-2xl: 1.375rem;
--text-2xl--line-height: calc(2 / 1.375);
}
__________________ tailwind.config.js
module.exports = {
content: ['./your-files/**/*.{html,js}']
};
Beta Was this translation helpful? Give feedback.
All reactions