File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,18 @@ $md-mini-fab-padding: 8px !default;
8585 @include md-elevation (8 );
8686 }
8787
88- & .md-button-focus {
89- background-color : md-color ($md-foreground , base , 0.12 );
90- @include md-button-theme (' background-color' , 600 );
88+ & .md-button-focus :after {
89+ // The button spec calls for focus on raised buttons (and FABs) to be indicated with a
90+ // black, 12% opacity shade over the normal color (for both light and dark themes).
91+ // We do this by placing an :after psuedo-element with the appropriate shade over the button.
92+ position : absolute ;
93+ top : 0 ;
94+ left : 0 ;
95+ bottom : 0 ;
96+ right : 0 ;
97+ content : ' ' ;
98+ background-color : rgba (black , 0.12 );
99+ pointer-events : none ;
91100 }
92101
93102 & [disabled ] {
@@ -111,7 +120,8 @@ $md-mini-fab-padding: 8px !default;
111120 padding : $padding 0 ;
112121 }
113122
114- & .md-button-focus {
115- background-color : md-color ($md-accent , 600 );
123+ // The focus shading for FABs needs to match the FAB's circular shape.
124+ & .md-button-focus :after {
125+ border-radius : 50% ;
116126 }
117127}
You can’t perform that action at this time.
0 commit comments