feat: tailwindcss dark mode color

This commit is contained in:
alisa 2023-04-25 21:45:33 +08:00
parent e88fff9e3d
commit a3a869d9c1
2 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,21 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
@layer base {
:root {
--text-main: #333;
--text-secondary: #4b525d;
--bg-card: #fff;
--bg-active: #fbfbfc;
--bg-hover: #eee;
}
html.dark {
--text-main: #f7f7f7;
--text-secondary: #6f6e84;
--bg-card: #28334e;
--bg-active: #242b40;
--bg-hover: #303044;
}
}

View File

@ -5,12 +5,15 @@ module.exports = {
theme: { theme: {
extend: { extend: {
colors: { colors: {
main: '#5973fe',
yes: '#3fb68b', yes: '#3fb68b',
no: '#ff5353', no: '#ff5353',
info: '#00b2ff', info: '#00b2ff',
textMain: '#333',
primary: '#666cff', primary: '#666cff',
main: 'var(--text-main)',
secondary: 'var(--text-secondary)',
card: 'var(--bg-card)',
hover: 'var(--bg-hover)',
active: 'var(--bg-active)',
}, },
}, },
}, },