Skip to content

Commit 6cdd8db

Browse files
devversionandrewseguin
authored andcommitted
fix(button): add transition to focus overlay (#2850)
* 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 8541f8e commit 6cdd8db

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
@@ -81,6 +81,8 @@
8181
pointer-events: none;
8282
opacity: 0;
8383

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

0 commit comments

Comments
 (0)