From b9b5abab3364bf752e9644415088b142a153e385 Mon Sep 17 00:00:00 2001 From: Graeme Yeates Date: Thu, 11 Jan 2018 21:02:34 -0500 Subject: [PATCH] Add @switch-color to control switch colors (#8940) --- components/style/themes/default.less | 1 + components/switch/style/index.less | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/style/themes/default.less b/components/style/themes/default.less index 19860ab0fba8..7cccc45ce128 100644 --- a/components/style/themes/default.less +++ b/components/style/themes/default.less @@ -393,6 +393,7 @@ @switch-height: 22px; @switch-sm-height: 16px; @switch-disabled-opacity: 0.4; +@switch-color: @primary-color; // Pagination // --- diff --git a/components/switch/style/index.less b/components/switch/style/index.less index d8d15ac0789d..987f1a601742 100644 --- a/components/switch/style/index.less +++ b/components/switch/style/index.less @@ -68,11 +68,11 @@ } &-checked&-loading:before { - color: @primary-color; + color: @switch-color; } &:focus { - box-shadow: 0 0 0 2px fade(@primary-color, 20%); + box-shadow: 0 0 0 2px fade(@switch-color, 20%); outline: 0; } @@ -127,7 +127,7 @@ } &-checked { - background-color: @primary-color; + background-color: @switch-color; .@{switch-prefix-cls}-inner { margin-left: 6px;