Skip to content

Commit 7c87c07

Browse files
committed
feat(theme): migrate to Tailwind CSS variables and refactor theme system
1 parent caf750d commit 7c87c07

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

docs/tailwind.config.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module.exports = {
22
content: [
3-
'./docs/**/*.{md,mdx,js,ts,jsx,tsx}',
4-
'./theme/**/*.{js,ts,jsx,tsx}',
3+
"./docs/**/*.{md,mdx,js,ts,jsx,tsx}",
4+
"./theme/**/*.{js,ts,jsx,tsx}",
55
],
6-
darkMode: ['selector'],
6+
darkMode: ["selector"],
77
theme: {
88
extend: {
99
colors: {
10-
background: 'hsl(var(--background))',
11-
foreground: 'hsl(var(--foreground))',
12-
primary: 'hsl(var(--primary))',
13-
}
14-
}
15-
}
16-
}
10+
background: "hsl(var(--background))",
11+
foreground: "hsl(var(--foreground))",
12+
primary: "hsl(var(--primary))",
13+
},
14+
},
15+
},
16+
};

docs/theme/styles/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
--color-background: hsl(0 0% 100%);
66
--color-foreground: hsl(222.2 84% 4.9%);
77
--color-primary: hsl(221.2 83.2% 53.3%);
8-
8+
99
--color-background: var(--background);
1010
--color-foreground: var(--foreground);
1111
--color-primary: var(--primary);

docs/theme/styles/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useLang } from "rspress/runtime";
22
import {
33
HomeLayout as BasicHomeLayout,
4-
Layout as BasicLayout
4+
Layout as BasicLayout,
55
} from "rspress/theme";
66
import "./styles/index.css";
77

@@ -21,7 +21,7 @@ const Layout = () => {
2121
: "🚧 MateChat React 文档仍在开发中"}
2222
</div>
2323
}
24-
// components={{ ... }}
24+
// components={{ ... }}
2525
/>
2626
);
2727
};

0 commit comments

Comments
 (0)