Skip to content

Commit 9aad017

Browse files
committed
fix: 修改主题变量
1 parent 270e492 commit 9aad017

File tree

2 files changed

+56
-44
lines changed

2 files changed

+56
-44
lines changed

src/packages/configprovider/types.ts

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export type NutCSSVariables =
2-
| 'nutuiBrand6'
2+
| 'nutuiColorPrimary'
33
| 'nutuiColorPrimaryStop1'
44
| 'nutuiColorPrimaryStop2'
55
| 'nutuiColorPrimaryPressed'
66
| 'nutuiColorPrimaryDisabled'
7-
| 'nutuiBrand3'
8-
| 'nutuiBrand1'
9-
| 'nutuiRed6'
10-
| 'nutuiGray8'
11-
| 'nutuiRed3'
7+
| 'nutuiColorPrimaryDisabledSpecial'
8+
| 'nutuiColorPrimaryLightPressed'
9+
| 'nutuiColorPrimaryIcon'
10+
| 'nutuiColorPrimaryIconDisabled'
11+
| 'nutuiColorPrimarySpecialdisabled'
1212
| 'nutuiColorDefault'
1313
| 'nutuiColorDefaultPressed'
1414
| 'nutuiColorDefaultLight'
@@ -18,33 +18,38 @@ export type NutCSSVariables =
1818
| 'nutuiColorInfoDisabled'
1919
| 'nutuiColorInfoLight'
2020
| 'nutuiColorInfoBackground'
21-
| 'nutuiGreen2'
22-
| 'nutuiGreen3'
21+
| 'nutuiColorSuccess'
22+
| 'nutuiColorSuccessPressed'
2323
| 'nutuiColorSuccessDisabled'
24-
| 'nutuiGreen1'
25-
| 'nutuiYellow2'
26-
| 'nutuiYellow3'
24+
| 'nutuiColorSuccessLight'
25+
| 'nutuiColorSuccessBackground'
26+
| 'nutuiColorSuccessText'
27+
| 'nutuiColorWarning'
28+
| 'nutuiColorWarningPressed'
2729
| 'nutuiColorWarningDisabled'
28-
| 'nutuiYellow1'
29-
| 'nutuiRed2'
30+
| 'nutuiColorWarningLight'
31+
| 'nutuiColorWarningBackground'
32+
| 'nutuiColorWarningText'
33+
| 'nutuiColorDanger'
3034
| 'nutuiColorDangerPressed'
3135
| 'nutuiColorDangerDisabled'
32-
| 'nutuiRed1'
36+
| 'nutuiColorDangerLight'
3337
| 'nutuiColorDangerBackground'
34-
| 'nutuiGray3'
35-
| 'nutuiGray1'
38+
| 'nutuiColorDangerText'
39+
| 'nutuiColorBackground'
40+
| 'nutuiColorBackgroundOverlay'
3641
| 'nutuiColorBackgroundSunken'
37-
| 'nutuiGray2'
38-
| 'nutuiBlack10'
39-
| 'nutuiBlack7'
40-
| 'nutuiBlack2'
41-
| 'nutuiBlack3'
42-
| 'nutuiGray4'
43-
| 'nutuiGray7'
44-
| 'nutuiGray6'
45-
| 'nutuiGray5'
46-
| 'nutuiWhite12'
47-
| 'nutuiBlue2'
42+
| 'nutuiColorMask'
43+
| 'nutuiColorMaskPart'
44+
| 'nutuiColorMaskFaultToleran'
45+
| 'nutuiColorBorder'
46+
| 'nutuiColorBorderDisabled'
47+
| 'nutuiColorTitle'
48+
| 'nutuiColorText'
49+
| 'nutuiColorTextHelp'
50+
| 'nutuiColorTextDisabled'
51+
| 'nutuiColorTextDark'
52+
| 'nutuiColorTextLink'
4853
| 'nutuiFontSizeXxs'
4954
| 'nutuiFontSizeXs'
5055
| 'nutuiFontSizeS'
@@ -176,6 +181,7 @@ export type NutCSSVariables =
176181
| 'nutuiUploaderPreviewMarginBottom'
177182
| 'nutuiUploaderPreviewTipsHeight'
178183
| 'nutuiUploaderPreviewTipsBackground'
184+
| 'nutuiBlack7'
179185
| 'nutuiUploaderPreviewTipsPadding'
180186
| 'nutuiUploaderPreviewCloseRight'
181187
| 'nutuiUploaderPreviewCloseTop'
@@ -188,6 +194,7 @@ export type NutCSSVariables =
188194
| 'nutuiPickerItemTextColor'
189195
| 'nutuiPickerItemTextFontSize'
190196
| 'nutuiPickerItemActiveLineBorder'
197+
| 'nutuiWhite12'
191198
| 'nutuiWhite7'
192199
| 'nutuiInputBorderBottom'
193200
| 'nutuiInputBorderBottomWidth'
@@ -261,8 +268,8 @@ export type NutCSSVariables =
261268
| 'nutuiCountdownNumberPrimaryBackgroundColor'
262269
| 'nutuiCountdownNumberPrimaryBorderColor'
263270
| 'nutuiPriceColor'
264-
| 'nutuiColorTextHelp'
265271
| 'nutuiPriceDarkgrayColor'
272+
| 'nutuiGray7'
266273
| 'nutuiPriceLineColor'
267274
| 'nutuiPriceSymbolPaddingRight'
268275
| 'nutuiPriceSymbolXlargeSize'
@@ -715,6 +722,7 @@ export type NutCSSVariables =
715722
| 'nutuiGridItemBorderRadius'
716723
| 'nutuiGridItemContentPadding'
717724
| 'nutuiGridItemContentBgColor'
725+
| 'nutuiGray1'
718726
| 'nutuiGridItemTextMargin'
719727
| 'nutuiGridItemTextColor'
720728
| 'nutuiGridItemTextFontSize'
@@ -841,4 +849,5 @@ export type NutCSSVariables =
841849
| 'nutuiResultpageDescriptionLineHeight'
842850
| 'nutuiResultpageActionsMarginTop'
843851
| 'nutuiSafeAreaMultiple'
852+
| 'nutuiBlack3'
844853
| 'nutuiBlack1'

src/styles/variables.scss

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ----------------------------------------------------
22
// 主色调 // done
3-
$color-primary: var(--nutui-brand-6) !default;
3+
$color-primary: var(--nutui-color-primary, #ff0f23) !default;
44
$color-primary-stop-1: var(--nutui-color-primary-stop-1, #ff475d) !default;
55
$color-primary-stop-2: var(--nutui-color-primary-stop-2, #ff0f23) !default;
66
$color-primary-pressed: var(--nutui-color-primary-pressed, #e53029) !default;
@@ -56,11 +56,11 @@ $color-success-light: var(
5656
--nutui-color-success-light,
5757
#ebfbeb
5858
) !default; // done
59-
$color-success-background: var(--nutui-color-success, #00d900) !default; // done
60-
$color-success-text: var(
61-
--nutui-color-success-pressed,
62-
#2aa32a
59+
$color-success-background: var(
60+
--nutui-color-success-background,
61+
#00d900
6362
) !default; // done
63+
$color-success-text: var(--nutui-color-success-text, #2aa32a) !default; // done
6464

6565
// 警告色
6666
$color-warning: var(--nutui-color-warning, #ffbf00) !default; // done
@@ -73,11 +73,11 @@ $color-warning-light: var(
7373
--nutui-color-warning-light,
7474
#fff5cc
7575
) !default; // done
76-
$color-warning-background: var(--nutui-color-warning, #ffbf00) !default; // done
77-
$color-warning-text: var(
78-
--nutui-color-warning-pressed,
79-
#c47600
76+
$color-warning-background: var(
77+
--nutui-color-warning-background,
78+
#ffbf00
8079
) !default; // done
80+
$color-warning-text: var(--nutui-color-warning-text, #c47600) !default; // done
8181

8282
// 危险色
8383
$color-danger: var(--nutui-color-danger, #ff0f23) !default; //done
@@ -91,7 +91,7 @@ $color-danger-background: var(
9191
--nutui-color-danger-background,
9292
#ff0f23
9393
) !default; //done
94-
$color-danger-text: var(--nutui-color-danger, #ff0f23) !default; //done
94+
$color-danger-text: var(--nutui-color-danger-text, #ff0f23) !default; //done
9595

9696
// 背景色
9797
$color-background: var(--nutui-color-background, #f2f3f5) !default; //done
@@ -122,12 +122,15 @@ $color-border: var(--nutui-color-border, rgba(0, 0, 0, 0.06)) !default;
122122
$color-border-disabled: var(--nutui-color-border-disabled, #c2c4cc) !default;
123123

124124
// 文本色
125-
$color-title: var(--nutui-gray-7) !default;
126-
$color-text: var(--nutui-gray-6) !default;
127-
$color-text-help: var(--nutui-gray-5) !default;
128-
$color-text-disabled: var(--nutui-gray-4) !default;
129-
$color-text-dark: var(--nutui-white-12) !default;
130-
$color-text-link: var(--nutui-blue-2) !default;
125+
$color-title: var(--nutui-color-title, #1a1a1a) !default;
126+
$color-text: var(--nutui-color-text, #505259) !default;
127+
$color-text-help: var(--nutui-color-text-help, #888b94) !default;
128+
$color-text-disabled: var(--nutui-color-text-disabled, #c2c4cc) !default;
129+
$color-text-dark: var(
130+
--nutui-color-text-dark,
131+
rgba(255, 255, 255, 0.9)
132+
) !default;
133+
$color-text-link: var(--nutui-color-text-link, #0073ff) !default;
131134

132135
// 与品牌色一起使用,默认为白色,不区分暗黑与明亮模式。
133136
$color-primary-text: #ffffff !default;

0 commit comments

Comments
 (0)