From 5a8bf7ac0aab97e563233e6a82f7166bc005e16d Mon Sep 17 00:00:00 2001 From: zsmj Date: Fri, 17 Jun 2022 11:27:07 +0800 Subject: [PATCH] =?UTF-8?q?DESIGN-3918=20feat:=20=E6=8B=93=E5=B1=95box-sha?= =?UTF-8?q?dow,=E5=85=81=E8=AE=B8=E9=85=8D=E7=BD=AE=E5=B8=B8=E9=87=8F?= =?UTF-8?q?=E4=B8=80=E6=A0=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B8=AA=E9=98=B4?= =?UTF-8?q?=E5=BD=B1=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 先前的方案真是为了配置而配置,毫无卵用,现在想要什么效果,随意配好了 --- bi.lessconfig.json | 3 +-- src/less/base/single/tip/tip.toast.less | 2 +- src/less/lib/constant.less | 3 +++ src/less/lib/theme.less | 1 - src/less/visual.less | 32 +++++++++++++++---------- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/bi.lessconfig.json b/bi.lessconfig.json index fafccaff8..141c28c7c 100644 --- a/bi.lessconfig.json +++ b/bi.lessconfig.json @@ -35,6 +35,5 @@ "@color-bi-color-toast-warning": "#FAAA39", "@color-bi-color-toast-error": "#E65251", "@color-bi-color-toast-normal": "#2C60DB", - "@color-bi-color-toast-text": "#000A19", - "@color-bi-color-toast-shadow": "rgba(9, 30, 64, 0.16)" + "@color-bi-color-toast-text": "#000A19" } diff --git a/src/less/base/single/tip/tip.toast.less b/src/less/base/single/tip/tip.toast.less index cb39afe70..6f792ac49 100644 --- a/src/less/base/single/tip/tip.toast.less +++ b/src/less/base/single/tip/tip.toast.less @@ -4,7 +4,7 @@ color: @color-bi-color-toast-text; line-height: @font-size-16; .border-radius(2px); - .box-shadow(0 6px 20px -2px, @color-bi-color-toast-shadow); + .box-shadow(@box-shadow-toast) ; &.toast-success { background: @color-bi-background-toast-success; diff --git a/src/less/lib/constant.less b/src/less/lib/constant.less index 5236ce2cb..b3a514511 100644 --- a/src/less/lib/constant.less +++ b/src/less/lib/constant.less @@ -244,3 +244,6 @@ @scroll-color-theme-dark: @color-white; @scroll-thumb-color: @color-black; @scroll-thumb-color-theme-dark: @color-black; + +//box-shadow效果 +@box-shadow-toast: 0 2px 6px 0 rgba(0, 0, 0, 0.2); diff --git a/src/less/lib/theme.less b/src/less/lib/theme.less index 2a570c985..87d578943 100644 --- a/src/less/lib/theme.less +++ b/src/less/lib/theme.less @@ -32,7 +32,6 @@ @color-bi-color-toast-error: @color-bi-text; @color-bi-color-toast-normal: @color-bi-text; @color-bi-color-toast-text: @color-bi-text; -@color-bi-color-toast-shadow: @color-bi-background-black; //bubble @color-bi-background-bubble-success: @color-bi-background-light-success; diff --git a/src/less/visual.less b/src/less/visual.less index fca93b43c..8e227fb8f 100644 --- a/src/less/visual.less +++ b/src/less/visual.less @@ -16,6 +16,12 @@ box-shadow: none; } +.box-shadow(@shadow) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + .box-shadow(@style, @c) when (iscolor(@c)) { -webkit-box-shadow: @style @c; -moz-box-shadow: @style @c; @@ -219,7 +225,7 @@ margin-top: 5px; content: ""; transform: rotate(-135deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); } } @@ -238,7 +244,7 @@ margin-top: -5px; content: ""; transform: rotate(45deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); } } @@ -258,7 +264,7 @@ margin-top: 4px; content: ""; transform: rotate(135deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.06)); } } @@ -277,26 +283,26 @@ margin-top: 4px; content: ""; transform: rotate(-45deg); - .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); + .box-shadow(3px 3px 10px 0, rgba(0, 0, 0, 0.07)); } } // css3 animation .keyframes(@name, @frames) { @-webkit-keyframes @name { - @frames(); + @frames(); } @-moz-keyframes @name { - @frames(); + @frames(); } @-ms-keyframes @name { - @frames(); + @frames(); } @-o-keyframes @name { - @frames(); + @frames(); } @keyframes @name { - @frames(); + @frames(); } } @@ -326,10 +332,10 @@ .transform-origin (@x:center, @y:center) { -webkit-transform-origin: @x @y; - -moz-transform-origin: @x @y; - -ms-transform-origin: @x @y; - -o-transform-origin: @x @y; - transform-origin: @x @y; + -moz-transform-origin: @x @y; + -ms-transform-origin: @x @y; + -o-transform-origin: @x @y; + transform-origin: @x @y; } .hover-visible(@cls) {