Files
netto/site/tailwind.config.ts
Maofeng 4efe3f3c64 feat(site): add component documentation site
Add Vite, React, MDX, and Tailwind documentation infrastructure.

Document component, handbook, overview, and utility routes.

Add interactive examples for every component family.

Deduplicate React resolution and load the Tailwind 4 theme configuration.
2026-07-25 06:04:19 +08:00

50 lines
1.2 KiB
TypeScript

import type { Config } from "tailwindcss"
import plugin from "tailwindcss/plugin"
export default {
darkMode: "class",
content: ["./index.html", "./src/**/*.{ts,tsx,mdx}", "../src/components/**/*.{ts,tsx}"],
theme: {
extend: {
zIndex: {
1: "1",
},
},
},
plugins: [
plugin(({ addVariant }) => {
addVariant("any-pointer-coarse", "@media (any-pointer: coarse)")
addVariant("not-data-disabled", "&:not([data-disabled])")
addVariant("not-data-pressed", "&:not([data-pressed])")
for (const attribute of [
"active",
"behind",
"checked",
"closed",
"disabled",
"empty",
"ending-style",
"expanded",
"highlighted",
"hovering",
"instant",
"limited",
"nested-dialog-open",
"nested-drawer-open",
"nested-drawer-swiping",
"placeholder",
"popup-open",
"pressed",
"scrolling",
"selected",
"starting-style",
"swiping",
"unchecked",
]) {
addVariant(`data-${attribute}`, `&[data-${attribute}]`)
}
}),
],
} satisfies Config