Skip to content

Commit

Permalink
fix(button): update button colors, focus states (#3598)
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored and asudoh committed Aug 1, 2019
1 parent 26b5cf4 commit 5f10330
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@
width: 100%;
}

.bx--tooltip__trigger:hover {
color: inherit;
}

& .text-input .bx--text-input {
min-width: 20rem;
}
Expand Down
23 changes: 20 additions & 3 deletions packages/components/src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@
color: $inverse-01;
}

&:focus {
color: $text-04;
background-color: $interactive-03;
}

&:active {
background-color: $active-primary;
}

&:disabled,
&:hover:disabled,
&:focus:disabled,
Expand Down Expand Up @@ -167,12 +176,20 @@
}
}

.#{$prefix}--btn--icon-only {
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger {
@include tooltip--trigger('icon', 'bottom');
outline: $button-outline-width solid transparent;
outline-offset: -4px;
}

.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger:focus {
border-color: $focus;
outline-color: $ui-02;
}

.#{$prefix}--btn--icon-only:focus svg {
outline: none;
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger:focus
svg {
outline-color: transparent;
}

.#{$prefix}--btn--icon-only--top {
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/components/button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
flex-shrink: 0;
width: rem(16px);
height: rem(16px);
transition: all $duration--fast-01 motion(entrance, productive);
}
}

Expand Down

0 comments on commit 5f10330

Please sign in to comment.