fix: some browser hsl function compatibility issues

pull/48/MERGE
vben 2024-07-13 22:55:13 +08:00
parent 91058c3ed9
commit 31fd19f17a
3 changed files with 16 additions and 16 deletions

View File

@ -72,25 +72,25 @@ const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [
}, },
{ {
color: 'hsl(240 5% 26%)', color: 'hsl(240 5% 26%)',
darkPrimaryColor: 'hsl(0 0 98%)', darkPrimaryColor: 'hsl(0 0% 98%)',
primaryColor: 'hsl(240 5.9% 10%)', primaryColor: 'hsl(240 5.9% 10%)',
type: 'zinc', type: 'zinc',
}, },
{ {
color: 'hsl(0 0% 25%)', color: 'hsl(0 0% 25%)',
darkPrimaryColor: 'hsl(0 0 98%)', darkPrimaryColor: 'hsl(0 0% 98%)',
primaryColor: 'hsl(240 5.9% 10%)', primaryColor: 'hsl(240 5.9% 10%)',
type: 'neutral', type: 'neutral',
}, },
{ {
color: 'hsl(215 25% 27%)', color: 'hsl(215 25% 27%)',
darkPrimaryColor: 'hsl(0 0 98%)', darkPrimaryColor: 'hsl(0 0% 98%)',
primaryColor: 'hsl(240 5.9% 10%)', primaryColor: 'hsl(240 5.9% 10%)',
type: 'slate', type: 'slate',
}, },
{ {
color: 'hsl(217 19% 27%)', color: 'hsl(217 19% 27%)',
darkPrimaryColor: 'hsl(0 0 98%)', darkPrimaryColor: 'hsl(0 0% 98%)',
primaryColor: 'hsl(240 5.9% 10%)', primaryColor: 'hsl(240 5.9% 10%)',
type: 'gray', type: 'gray',
}, },

View File

@ -22,31 +22,31 @@
/* 主题颜色 */ /* 主题颜色 */
/* --primary: 245 82% 67%; */ /* --primary: 245 82% 67%; */
--primary-foreground: 0 0 98%; --primary-foreground: 0 0% 98%;
/* Used for destructive actions such as <Button variant="destructive"> */ /* Used for destructive actions such as <Button variant="destructive"> */
--destructive: 0 78% 68%; --destructive: 0 78% 68%;
--destructive-foreground: 0 0 98%; --destructive-foreground: 0 0% 98%;
/* Used for success actions such as <message> */ /* Used for success actions such as <message> */
--success: 144 57% 58%; --success: 144 57% 58%;
--success-foreground: 0 0 98%; --success-foreground: 0 0% 98%;
/* Used for warning actions such as <message> */ /* Used for warning actions such as <message> */
--warning: 42 84% 61%; --warning: 42 84% 61%;
--warning-foreground: 0 0 98%; --warning-foreground: 0 0% 98%;
/* 颜色次要 */ /* 颜色次要 */
--secondary: 240 5% 17%; --secondary: 240 5% 17%;
--secondary-foreground: 0 0 98%; --secondary-foreground: 0 0% 98%;
/* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */ /* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
--accent: 0deg 0% 100% / 8%; --accent: 0deg 0% 100% / 8%;
--accent-hover: 0deg 0% 100% / 12%; --accent-hover: 0deg 0% 100% / 12%;
--accent-foreground: 0 0 98%; --accent-foreground: 0 0% 98%;
/* Darker color */ /* Darker color */
--heavy: 0deg 0% 100% / 12%; --heavy: 0deg 0% 100% / 12%;

View File

@ -5,7 +5,7 @@
'Segoe UI Symbol'; 'Segoe UI Symbol';
/* Default background color of <body />...etc */ /* Default background color of <body />...etc */
--background: 0 0 100%; --background: 0 0% 100%;
--foreground: 210 6% 21%; --foreground: 210 6% 21%;
/* Background color for <Card /> */ /* Background color for <Card /> */
@ -23,22 +23,22 @@
/* 主题颜色 */ /* 主题颜色 */
--primary: 211 91% 39%; --primary: 211 91% 39%;
--primary-foreground: 0 0 98%; --primary-foreground: 0 0% 98%;
/* Used for destructive actions such as <Button variant="destructive"> */ /* Used for destructive actions such as <Button variant="destructive"> */
--destructive: 0 78% 68%; --destructive: 0 78% 68%;
--destructive-foreground: 0 0 98%; --destructive-foreground: 0 0% 98%;
/* Used for success actions such as <message> */ /* Used for success actions such as <message> */
--success: 144 57% 58%; --success: 144 57% 58%;
--success-foreground: 0 0 98%; --success-foreground: 0 0% 98%;
/* Used for warning actions such as <message> */ /* Used for warning actions such as <message> */
--warning: 42 84% 61%; --warning: 42 84% 61%;
--warning-foreground: 0 0 98%; --warning-foreground: 0 0% 98%;
/* Secondary colors for <Button /> */ /* Secondary colors for <Button /> */
@ -60,7 +60,7 @@
/* Border color for inputs such as <Input />, <Select />, <Textarea /> */ /* Border color for inputs such as <Input />, <Select />, <Textarea /> */
--input: 240deg 5.88% 90%; --input: 240deg 5.88% 90%;
--input-placeholder: 217 10.6% 65%; --input-placeholder: 217 10.6% 65%;
--input-background: 0 0 100%; --input-background: 0 0% 100%;
/* Used for focus ring */ /* Used for focus ring */
--ring: 222.2 84% 4.9%; --ring: 222.2 84% 4.9%;