Ich habe meine Tailwind.config.js Datei so aussehen:
Code: Select all
/** @type {import('tailwindcss').Config} */
module.exports = {
//...
content: ['./pages/**/*.{js,ts,jsx,tsx}'],
plugins: [require("daisyui")],
daisyui: {
themes: true
}
}
< /code>
true
Code: Select all
import '../styles/globals.css'
import type { AppProps } from 'next/app'
function MyApp({ Component, pageProps }: AppProps) {
return (
)
}
export default MyApp
< /code>
I also made a postcss.config.js file
module.exports = {
plugins: ['tailwindcss', 'autoprefixer'],
};
< /code>
And I imported
@tailwind base;
@tailwind components;
@tailwind utilities;
< /code>
at the top of globals.css.
This fails because the resulting webpage is just plain white.
[img]https://i.sstatic.net/vA6Y3.jpg[/img]
But what's weird is when I change daisyui: { themes: true }
< /p>
Ich bin angenommen, dass dies nur funktioniert, weil dies nur so ist. Ich möchte in der Lage sein, verschiedene Themen auf einer Seite zu deklarieren, wenn ich möchte. Wie kann ich das Thema für die gesamte App korrekt so einstellen, dass ich es auf einzelnen Seiten überschreiben kann, wenn ich möchte?