Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修订主题变量 #2911

Open
wants to merge 6 commits into
base: feat_v3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 34 additions & 23 deletions src/packages/configprovider/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
export type NutCSSVariables =
| 'nutuiBrand6'
| 'nutuiColorPrimary'
| 'nutuiColorPrimaryStop1'
| 'nutuiColorPrimaryStop2'
| 'nutuiColorPrimaryPressed'
| 'nutuiColorPrimaryDisabled'
| 'nutuiColorPrimaryDisabledSpecial'
| 'nutuiColorPrimaryLightPressed'
| 'nutuiBrand3'
| 'nutuiBrand1'
| 'nutuiColorPrimaryIcon'
Expand All @@ -18,33 +20,38 @@ export type NutCSSVariables =
| 'nutuiColorInfoDisabled'
| 'nutuiColorInfoLight'
| 'nutuiColorInfoBackground'
| 'nutuiGreen2'
| 'nutuiGreen3'
| 'nutuiColorSuccess'
| 'nutuiColorSuccessPressed'
| 'nutuiColorSuccessDisabled'
| 'nutuiGreen1'
| 'nutuiYellow2'
| 'nutuiYellow3'
| 'nutuiColorSuccessLight'
| 'nutuiColorSuccessBackground'
| 'nutuiColorSuccessText'
| 'nutuiColorWarning'
| 'nutuiColorWarningPressed'
| 'nutuiColorWarningDisabled'
| 'nutuiYellow1'
| 'nutuiRed2'
| 'nutuiColorWarningLight'
| 'nutuiColorWarningBackground'
| 'nutuiColorWarningText'
| 'nutuiColorDanger'
| 'nutuiColorDangerPressed'
| 'nutuiColorDangerDisabled'
| 'nutuiRed1'
| 'nutuiColorDangerLight'
| 'nutuiColorDangerBackground'
| 'nutuiGray3'
| 'nutuiGray1'
| 'nutuiColorDangerText'
| 'nutuiColorBackground'
| 'nutuiColorBackgroundOverlay'
| 'nutuiColorBackgroundSunken'
| 'nutuiGray2'
| 'nutuiBlack10'
| 'nutuiBlack7'
| 'nutuiBlack2'
| 'nutuiBlack3'
| 'nutuiGray4'
| 'nutuiGray7'
| 'nutuiGray6'
| 'nutuiGray5'
| 'nutuiWhite12'
| 'nutuiBlue2'
| 'nutuiColorMask'
| 'nutuiColorMaskPart'
| 'nutuiColorMaskFaultToleran'
| 'nutuiColorBorder'
| 'nutuiColorBorderDisabled'
| 'nutuiColorTitle'
| 'nutuiColorText'
| 'nutuiColorTextHelp'
| 'nutuiColorTextDisabled'
| 'nutuiColorTextDark'
| 'nutuiColorTextLink'
| 'nutuiFontSizeXxs'
| 'nutuiFontSizeXs'
| 'nutuiFontSizeS'
Expand Down Expand Up @@ -176,6 +183,7 @@ export type NutCSSVariables =
| 'nutuiUploaderPreviewMarginBottom'
| 'nutuiUploaderPreviewTipsHeight'
| 'nutuiUploaderPreviewTipsBackground'
| 'nutuiBlack7'
| 'nutuiUploaderPreviewTipsPadding'
| 'nutuiUploaderPreviewCloseRight'
| 'nutuiUploaderPreviewCloseTop'
Expand All @@ -188,6 +196,7 @@ export type NutCSSVariables =
| 'nutuiPickerItemTextColor'
| 'nutuiPickerItemTextFontSize'
| 'nutuiPickerItemActiveLineBorder'
| 'nutuiWhite12'
| 'nutuiWhite7'
| 'nutuiInputBorderBottom'
| 'nutuiInputBorderBottomWidth'
Expand Down Expand Up @@ -261,8 +270,8 @@ export type NutCSSVariables =
| 'nutuiCountdownNumberPrimaryBackgroundColor'
| 'nutuiCountdownNumberPrimaryBorderColor'
| 'nutuiPriceColor'
| 'nutuiColorTextHelp'
| 'nutuiPriceDarkgrayColor'
| 'nutuiGray7'
| 'nutuiPriceLineColor'
| 'nutuiPriceSymbolPaddingRight'
| 'nutuiPriceSymbolXlargeSize'
Expand Down Expand Up @@ -715,6 +724,7 @@ export type NutCSSVariables =
| 'nutuiGridItemBorderRadius'
| 'nutuiGridItemContentPadding'
| 'nutuiGridItemContentBgColor'
| 'nutuiGray1'
| 'nutuiGridItemTextMargin'
| 'nutuiGridItemTextColor'
| 'nutuiGridItemTextFontSize'
Expand Down Expand Up @@ -841,4 +851,5 @@ export type NutCSSVariables =
| 'nutuiResultpageDescriptionLineHeight'
| 'nutuiResultpageActionsMarginTop'
| 'nutuiSafeAreaMultiple'
| 'nutuiBlack3'
| 'nutuiBlack1'
100 changes: 68 additions & 32 deletions src/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
// ----------------------------------------------------
// 主色调 // done
$color-primary: var(--nutui-brand-6) !default;
$color-primary: var(--nutui-color-primary, #ff0f23) !default;
$color-primary-stop-1: var(--nutui-color-primary-stop-1, #ff475d) !default;
$color-primary-stop-2: var(--nutui-color-primary-stop-2, #ff0f23) !default;
$color-primary-pressed: var(--nutui-color-primary-pressed, #e53029) !default;
$color-primary-disabled: var(--nutui-color-primary-disabled, #c2c4cc) !default;
$color-primary-disabled-special: var(--nutui-brand-3) !default;
$color-primary-light-pressed: var(--nutui-brand-1) !default;
$color-primary-disabled-special: var(
--nutui-color-primary-disabled-special,
#ffadbe
) !default;
$color-primary-light-pressed: var(
--nutui-color-primary-light-pressed,
#ffebf1
) !default;
$color-primary-gradient-1: linear-gradient(
135deg,
$color-primary-stop-1 0%,
Expand Down Expand Up @@ -40,61 +46,91 @@ $color-info-background: var(
$color-info-text: var(--nutui-color-info, #0073ff) !default; // done

// 成功色
$color-success: var(--nutui-green-2) !default; // done
$color-success-pressed: var(--nutui-green-3) !default; // done
$color-success: var(--nutui-color-success, #00d900) !default; // done
$color-success-pressed: var(
--nutui-color-success-pressed,
#2aa32a
) !default; // done
$color-success-disabled: var(--nutui-color-success-disabled, #b2f0ae) !default;
$color-success-light: var(--nutui-green-1) !default; // done
$color-success-background: var(--nutui-green-2) !default; // done
$color-success-text: var(--nutui-green-3) !default; // done
$color-success-light: var(
--nutui-color-success-light,
#ebfbeb
) !default; // done
$color-success-background: var(
--nutui-color-success-background,
#00d900
) !default; // done
$color-success-text: var(--nutui-color-success-text, #2aa32a) !default; // done

// 警告色
$color-warning: var(--nutui-yellow-2) !default; // done
$color-warning-pressed: var(--nutui-yellow-3) !default; // done
$color-warning: var(--nutui-color-warning, #ffbf00) !default; // done
$color-warning-pressed: var(
--nutui-color-warning-pressed,
#c47600
) !default; // done
$color-warning-disabled: var(--nutui-color-warning-disabled, #fdd3b9) !default;
$color-warning-light: var(--nutui-yellow-1) !default; // done
$color-warning-background: var(--nutui-yellow-2) !default; // done
$color-warning-text: var(--nutui-yellow-3) !default; // done
$color-warning-light: var(
--nutui-color-warning-light,
#fff5cc
) !default; // done
$color-warning-background: var(
--nutui-color-warning-background,
#ffbf00
) !default; // done
$color-warning-text: var(--nutui-color-warning-text, #c47600) !default; // done

// 危险色
$color-danger: var(--nutui-red-2) !default; //done
$color-danger-pressed: var(--nutui-color-danger-pressed) !default;
$color-danger: var(--nutui-color-danger, #ff0f23) !default; //done
$color-danger-pressed: var(--nutui-color-danger-pressed, #ff3333) !default;
$color-danger-disabled: var(
--nutui-color-danger-disabled,
$color-primary-disabled-special
) !default;
$color-danger-light: var(--nutui-red-1) !default; //done
$color-danger-background: var(--nutui-color-danger-background) !default; //done
$color-danger-text: var(--nutui-red-2) !default; //done
$color-danger-light: var(--nutui-color-danger-light, #ffebef) !default; //done
$color-danger-background: var(
--nutui-color-danger-background,
#ff0f23
) !default; //done
$color-danger-text: var(--nutui-color-danger-text, #ff0f23) !default; //done

// 背景色
$color-background: var(--nutui-gray-3) !default; //done
$color-background: var(--nutui-color-background, #f2f3f5) !default; //done
// 卡片背景色
$color-background-overlay: var(--nutui-gray-1) !default;
$color-background-overlay: var(
--nutui-color-background-overlay,
#ffffff
) !default;
// 卡片内嵌背景色
$color-background-sunken: var(
--nutui-color-background-sunken,
var(--nutui-gray-2)
#f7f8fc
) !default;

// 蒙层颜色
// 页面全局蒙层
$color-mask: var(--nutui-black-10) !default;
$color-mask: var(--nutui-color-mask, rgba(0, 0, 0, 0.7)) !default;
// 局部蒙层
$color-mask-part: var(--nutui-black-7) !default;
$color-mask-part: var(--nutui-color-mask-part, rgba(0, 0, 0, 0.4)) !default;
// 容错蒙层
$color-mask-fault-toleran: var(--nutui-black-2) !default;
$color-mask-fault-toleran: var(
--nutui-color-mask-fault-toleran,
rgba(0, 0, 0, 0.02)
) !default;

// 边框色
$color-border: var(--nutui-black-3) !default;
$color-border-disabled: var(--nutui-gray-4) !default;
$color-border: var(--nutui-color-border, rgba(0, 0, 0, 0.06)) !default;
$color-border-disabled: var(--nutui-color-border-disabled, #c2c4cc) !default;

// 文本色
$color-title: var(--nutui-gray-7) !default;
$color-text: var(--nutui-gray-6) !default;
$color-text-help: var(--nutui-gray-5) !default;
$color-text-disabled: var(--nutui-gray-4) !default;
$color-text-dark: var(--nutui-white-12) !default;
$color-text-link: var(--nutui-blue-2) !default;
$color-title: var(--nutui-color-title, #1a1a1a) !default;
$color-text: var(--nutui-color-text, #505259) !default;
$color-text-help: var(--nutui-color-text-help, #888b94) !default;
$color-text-disabled: var(--nutui-color-text-disabled, #c2c4cc) !default;
$color-text-dark: var(
--nutui-color-text-dark,
rgba(255, 255, 255, 0.9)
) !default;
$color-text-link: var(--nutui-color-text-link, #0073ff) !default;

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