Skip to content

Commit

Permalink
fix(@clayui/css): Mixins clay-button-variant adds option to style `…
Browse files Browse the repository at this point in the history
…:disabled:focus`, mostly for removing focus shadow on disabled `.btn`

fix(@clayui/css): Mixins `clay-button-variant` key names should map as close as possible to selector names, renames `section` to `btn-section`. There is still an alias for `section`.
  • Loading branch information
pat270 committed Sep 14, 2021
1 parent d5a1942 commit bb942f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/clay-css/src/scss/mixins/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@
)
);

$disabled-focus: setter(map-get($disabled, focus), ());

$nested-disabled-active: setter(map-get($disabled, active), ());
$disabled-active: setter(map-get($map, disabled-active), ());
$disabled-active: map-merge($nested-disabled-active, $disabled-active);
Expand Down Expand Up @@ -281,7 +283,9 @@
)
);

$btn-section: setter(map-get($map, btn-section), ());
$section: setter(map-get($map, section), ());
$section: map-merge($btn-section, $section);
$section: map-merge(
$section,
(
Expand Down Expand Up @@ -410,6 +414,10 @@
&.disabled {
@include clay-css($disabled);

&:focus {
@include clay-css($disabled-focus);
}

&:active {
@include clay-css($disabled-active);
}
Expand Down

0 comments on commit bb942f9

Please sign in to comment.