Что я пробовал:
Код: Выделить всё
tailwind.config.tsКод: Выделить всё
import type { Config } from "tailwindcss";
const config: Config = {
darkMode: "class",
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {
colors: {
muted: "hsl(var(--muted))",
"muted-foreground": "hsl(var(--muted-foreground))",
// other custom colors...
},
},
},
plugins: [],
};
export default config;
Код: Выделить всё
@import "tailwindcss";
@layer base {
:root {
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
}
.dark {
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
}
}
< /code>
jsx Использование: < /p>
Test
- класс Bg-mated отображается в html.
- Но это не применяет какой-либо видимый цвет фонового цвета . /> Ошибки не допускаются. : root .
- Файл с использованием bg-mated внутри src/ и покрывается контентом .
- Другие классы Thinwind (например, Bg-Red-500 P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> p> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> P> PRICH-FIR. />
- Пробовал переключиться на Mited: {default: "hsl (var (-wited))"} -без изменений.
Почему Bg-medup
Подробнее здесь: https://stackoverflow.com/questions/797 ... -variables