是的,当然。 在您的 global.css 文件中,您可以像这样使用默认样式:
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
h1 {
@apply text-2xl;
}
h2 {
@apply text-xl;
}
input {
@apply text-base-content
}
/* ... */
}
您可以在这里阅读更多内容: https://tailwindcss.com/docs/adding-custom-styles#using-css-and-layer
您可以使用“@apply”将您的类附加到现有的 Tailwind 类。您可以将其添加到 CSS 文件中,如下所示:
.label {
@apply input text-neutral-content;
}