From 998c87fa76e96a00bb60477546b702cefc4c6438 Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Wed, 28 Sep 2022 20:53:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20duotone=E5=9B=BE=E6=A0=87=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FontAwesomeIcon/scss/_variables.scss | 5 +++++ src/components/FontAwesomeIcon/scss/duotone.scss | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/FontAwesomeIcon/scss/_variables.scss b/src/components/FontAwesomeIcon/scss/_variables.scss index 23cce38..9959231 100644 --- a/src/components/FontAwesomeIcon/scss/_variables.scss +++ b/src/components/FontAwesomeIcon/scss/_variables.scss @@ -48,6 +48,11 @@ $fa-stack-z-index : auto !default; $fa-font-display : block !default; $fa-font-path : "./webfonts" !default; +$fa-primary-color : inherit !default; +$fa-primary-opacity : 1 !default; +$fa-secondary-opacity : 4 !default; +$fa-secondary-color : inherit !default; + $fa-var-0: \30; $fa-var-1: \31; $fa-var-2: \32; diff --git a/src/components/FontAwesomeIcon/scss/duotone.scss b/src/components/FontAwesomeIcon/scss/duotone.scss index 1b17358..fc89b88 100644 --- a/src/components/FontAwesomeIcon/scss/duotone.scss +++ b/src/components/FontAwesomeIcon/scss/duotone.scss @@ -28,8 +28,8 @@ .fad:before, .#{$fa-css-prefix}-duotone:before{ position: absolute; - color: var(--fa-primary-color,inherit); - opacity: var(--fa-primary-opacity,1); + color: $fa-primary-color; + opacity: $fa-primary-opacity; } .#{$fa-css-prefix}-duotone.#{$fa-css-prefix}-swap-opacity:before, @@ -38,9 +38,9 @@ .fad:before, .fad.#{$fa-css-prefix}-swap-opacity:before, .fad:after { - opacity: var(--fa-secondary-opacity,.4); + opacity: $fa-secondary-opacity; } .#{$fa-css-prefix}-duotone:after, .fad:after { - color: var(--fa-secondary-color,inherit); + color: $fa-secondary-color; } \ No newline at end of file