From ecca580d6a85289a7063c9857d2d688bed33e86c Mon Sep 17 00:00:00 2001 From: Tevin <tingquanren@163.com> Date: Fri, 03 Dec 2021 09:58:16 +0800 Subject: [PATCH] 全局颜色提取为sass变量 --- common/common.scss | 18 +++++++++--------- common/custom.scss | 28 ++++++++++++++-------------- common/sassMixin.scss | 11 +++++++++++ 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/common/common.scss b/common/common.scss index b9957b5..617fa29 100644 --- a/common/common.scss +++ b/common/common.scss @@ -12,27 +12,27 @@ } } -.m-mark { - color: #fb4242; -} +// .m-mark { +// color: #fb4242; +// } .m-text-stress { - color: #2093df; + color: $colorStress; } .m-text-success { - color: #22c322; + color: $colorSuccess; } .m-text-info { - color: #05b7c7; + color: $colorInfo; } .m-text-warning { - color: #db9d00; + color: $colorWarning; } .m-text-danger { - color: #FF5722; + color: $colorDanger; } .m-text-ignore { - color: rgba(0, 0, 0, 0.45); + color: $colorIgnore; } [class^="m-border"] { diff --git a/common/custom.scss b/common/custom.scss index 0c3e9a0..222b5dd 100644 --- a/common/custom.scss +++ b/common/custom.scss @@ -24,23 +24,23 @@ } &.at-button--primary { color: #FFF; - border: 1PX solid #2093df; - background: #2093df; + border: 1PX solid $colorStress; + background: $colorStress; &.btn-success { - border: 1PX solid #22c322; - background: #22c322; + border: 1PX solid $colorSuccess; + background: $colorSuccess; } &.btn-info { - border: 1PX solid #05b7c7; - background: #05b7c7; + border: 1PX solid $colorInfo; + background: $colorInfo; } &.btn-warning { - border: 1PX solid #db9d00; - background: #db9d00; + border: 1PX solid $colorWarning; + background: $colorWarning; } &.btn-danger { - border: 1PX solid #FF5722; - background: #FF5722; + border: 1PX solid $colorDanger; + background: $colorDanger; } } } @@ -128,8 +128,8 @@ visibility: visible; &.at-radio__icon--checked { .at-icon { - background: #2093df; - border-color: #2093df; + background: $colorStress; + border-color: $colorStress; } } .at-icon { @@ -165,7 +165,7 @@ .at-modal__action button { font-size: 36px; &:last-child { - color: #2093df; + color: $colorStress; } } } @@ -224,7 +224,7 @@ .weui-picker__hd { font-size: 36px; .weui-picker__action:last-child { - color: #2093df; + color: $colorStress; } } } diff --git a/common/sassMixin.scss b/common/sassMixin.scss index 669b3f8..91b8d70 100644 --- a/common/sassMixin.scss +++ b/common/sassMixin.scss @@ -3,6 +3,17 @@ * @author Tevin */ + +/** + * 全局颜色 + */ +$colorStress: #2093df; +$colorSuccess: #22c322; +$colorInfo: #05b7c7; +$colorWarning: #db9d00; +$colorDanger: #FF5722; +$colorIgnore: rgba(0, 0, 0, 0.45); + /** * clearfix - 清除浮动 * 示例 -- Gitblit v1.9.1