Skip to content

Commit

Permalink
style up focus for combo buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
snide authored and cjcenizal committed May 23, 2018
1 parent 5d5d9ad commit 9c5dcf6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/components/form/form_control_layout/_form_control_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,23 @@

.euiFormControlLayout__iconButton {
pointer-events: all;
top: $euiFormControlPadding - 1px;
top: $euiFormControlPadding;
height: $euiSize;
width: $euiSize;

svg {
margin-top: -$euiSizeXS;
}

&:focus {
background: $euiColorPrimary;
border-radius: 100%;
color: $euiColorGhost;
}

@at-root {
.euiFormControlLayout--compressed#{&} {
top: $euiFormControlPadding--compressed - 1px;
top: $euiFormControlPadding--compressed;
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/components/form/form_control_layout/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
background-color: transparentize($euiColorMediumShade, .5);
border-radius: $clearSize;
line-height: $clearSize;
transition: background-color $euiAnimSpeedExtraFast $euiAnimSlightResistance;

&:focus, &:hover {
background-color: $euiColorPrimary;
}

#{$iconClass} {
@include size($euiSizeS);
Expand Down

0 comments on commit 9c5dcf6

Please sign in to comment.