From ce8becefa4abc9bff79249a5f63446d714ed633d Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Fri, 31 Jul 2020 22:57:22 +0800 Subject: [PATCH] refactor(checkbox): focus style works on unchecked status --- src/_styles/Checkbox.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_styles/Checkbox.scss b/src/_styles/Checkbox.scss index b78f6c93f..52c179ec0 100644 --- a/src/_styles/Checkbox.scss +++ b/src/_styles/Checkbox.scss @@ -116,9 +116,9 @@ box-shadow: inset 0 0 0 1px map-get($--checkbox-border-color, 'active'); } } - &:focus { + &:focus:not(:active) { @include b(checkbox-box) { - box-shadow: inset 0 0 0 1px map-get($--checkbox-border-color, 'active'); + box-shadow: inset 0 0 0 1px map-get($--checkbox-border-color, 'active'), 0 0 0 2px change-color(map-get($--checkbox-border-color, 'active'), $alpha: .3); } } @include b(checkbox-box) { @@ -139,7 +139,7 @@ } } @include m(checked, indeterminate) { - &:focus { + &:focus:not(:active) { @include b(checkbox-box) { box-shadow: inset 0 0 0 1px map-get($--checkbox-border-color, 'active'), 0 0 0 2px change-color(map-get($--checkbox-border-color, 'active'), $alpha: .3); }