Skip to content

Commit

Permalink
fix: incorrect info color for element plus, fixed #4532
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan committed Oct 5, 2024
1 parent 28b54b5 commit 4a8218f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/@core/base/design/src/design-tokens/dark/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@

/* Used for success actions such as <message> */

--info: 180, 1.54%, 12.75%;
--info-foreground: 220, 4%, 58%;

/* Used for success actions such as <message> */

--success: 144 57% 58%;
--success-foreground: 0 0% 98%;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@

/* Used for success actions such as <message> */

--info: 240, 5%, 96%;
--info-foreground: 220, 4%, 58%;

/* Used for success actions such as <message> */

--success: 144 57% 58%;
--success-foreground: 0 0% 98%;

Expand Down
8 changes: 7 additions & 1 deletion packages/effects/hooks/src/use-design-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function useElementPlusDesignTokens() {
: getCssVariableValue('--destructive-50'),

'--el-color-info-light-8': border,
'--el-color-info-light-9': background,
'--el-color-info-light-9': getCssVariableValue('--info'), // getCssVariableValue('--secondary'),

'--el-color-primary': getCssVariableValue('--primary-500'),
'--el-color-primary-dark-2': getCssVariableValue('--primary'),
Expand Down Expand Up @@ -258,6 +258,12 @@ export function useElementPlusDesignTokens() {
'--el-fill-color-blank': background,
'--el-fill-color-light': getCssVariableValue('--accent'),
'--el-fill-color-lighter': getCssVariableValue('--accent-lighter'),

// 解决ElLoading背景色问题
'--el-mask-color': isDark.value
? 'rgba(0,0,0,.8)'
: 'rgba(255,255,255,.9)',

'--el-text-color-primary': getCssVariableValue('--foreground'),

'--el-text-color-regular': getCssVariableValue('--foreground'),
Expand Down

0 comments on commit 4a8218f

Please sign in to comment.