From 810d3fdce00e5b4159acfaddf28e0fffcf1a190a Mon Sep 17 00:00:00 2001 From: emyarod Date: Tue, 11 Aug 2020 13:17:35 -0500 Subject: [PATCH] fix(button): prevent box shadow overlaps --- .../components/src/components/button/_button.scss | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/components/src/components/button/_button.scss b/packages/components/src/components/button/_button.scss index fe036e7a8010..6554803a7dad 100644 --- a/packages/components/src/components/button/_button.scss +++ b/packages/components/src/components/button/_button.scss @@ -32,20 +32,27 @@ // 196px from design kit max-width: rem(196px); - &:not(:first-of-type):not(:focus) { + &:not(:focus) { box-shadow: rem(-1px) 0 0 0 $button-separator; } + + &:first-of-type:not(:focus) { + box-shadow: inherit; + } } .#{$prefix}--btn-set .#{$prefix}--btn:focus + .#{$prefix}--btn { box-shadow: inherit; } - .#{$prefix}--btn-set--stacked - .#{$prefix}--btn:not(:first-of-type):not(:focus) { + .#{$prefix}--btn-set--stacked .#{$prefix}--btn:not(:focus) { box-shadow: 0 rem(-1px) 0 0 $button-separator; } + .#{$prefix}--btn-set--stacked .#{$prefix}--btn:first-of-type:not(:focus) { + box-shadow: inherit; + } + .#{$prefix}--btn-set .#{$prefix}--btn.#{$prefix}--btn--disabled { box-shadow: rem(-1px) 0 0 0 $disabled-03;