Skip to content

Commit 1e1fac2

Browse files
committed
fix(button): add transition to focus overlay
* Adds a transition to the button focus overlay -It still shows up very fast, it just feels a bit smoother (similar as in MDL and M1)
1 parent 1a89a08 commit 1e1fac2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/lib/button/_button-base.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ $mat-button-min-width: 88px !default;
99
$mat-button-margin: 0 !default;
1010
$mat-button-line-height: 36px !default;
1111
$mat-button-border-radius: 2px !default;
12+
$mat-button-focus-transition: opacity 200ms $swift-ease-in-out-timing-function !default;
1213

1314
// Icon Button standards
1415
$mat-icon-button-size: 40px !default;

src/lib/button/button.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
pointer-events: none;
8484
opacity: 0;
8585

86+
transition: $mat-button-focus-transition;
87+
8688
@include cdk-high-contrast {
8789
// Note that IE will render this in the same way, no
8890
// matter whether the theme is light or dark. This helps

0 commit comments

Comments
 (0)