File tree Expand file tree Collapse file tree 5 files changed +22
-27
lines changed Expand file tree Collapse file tree 5 files changed +22
-27
lines changed Original file line number Diff line number Diff line change 64
64
);
65
65
}
66
66
67
- .button__outline {
67
+ .outline {
68
68
inset : 0 ;
69
69
border-style : solid ;
70
70
position : absolute ;
76
76
border-end-end-radius : var (--_container-shape-end-end );
77
77
}
78
78
79
- :host (:active ) .button__outline {
79
+ :host (:active ) .outline {
80
80
border-color : var (--_pressed-outline-color );
81
81
}
82
82
83
- :host ([disabled ]) .button__outline {
83
+ :host ([disabled ]) .outline {
84
84
border-color : var (--_disabled-outline-color );
85
85
opacity : var (--_disabled-outline-opacity );
86
86
}
87
87
88
88
@media (forced-colors : active ) {
89
- :host ([disabled ]) .button__outline {
89
+ :host ([disabled ]) .outline {
90
90
opacity : 1 ;
91
91
}
92
92
}
93
93
94
- .button__outline ,
95
- .button__ripple {
94
+ .outline ,
95
+ md-ripple {
96
96
border-width : var (--_outline-width );
97
97
}
98
98
99
- .button__ripple {
99
+ md-ripple {
100
100
inline-size : calc (100% - 2 * var (--_outline-width ));
101
101
block-size : calc (100% - 2 * var (--_outline-width ));
102
102
border-style : solid ;
103
103
border-color : transparent ;
104
104
}
105
105
}
106
-
107
- @function _resolve-tokens ($tokens ) {
108
- $tokens : shared .remove-unsupported-tokens ($tokens );
109
- @return $tokens ;
110
- }
Original file line number Diff line number Diff line change 37
37
);
38
38
}
39
39
40
- :host ([touch-target = ' wrapper' ]) {
41
- margin : max (0px , (48px - var (--_container-height )) / 2 ) 0 ;
42
- }
43
-
44
40
md-focus-ring {
45
41
@include focus-ring .theme (
46
42
(
109
105
position : absolute ;
110
106
}
111
107
112
- :host ([disabled ]) .button__label {
108
+ :host ([disabled ]) .label {
113
109
color : var (--_disabled-label-text-color );
114
110
opacity : var (--_disabled-label-text-opacity );
115
111
}
138
134
}
139
135
140
136
.button ,
141
- .button__ripple {
137
+ md-ripple {
142
138
border-start-start-radius : var (--_container-shape-start-start );
143
139
border-start-end-radius : var (--_container-shape-start-end );
144
140
border-end-start-radius : var (--_container-shape-end-start );
148
144
.button ::after ,
149
145
.button ::before ,
150
146
md-elevation ,
151
- .button__ripple {
147
+ md-ripple {
152
148
z-index : -1 ; // Place behind content
153
149
}
154
150
155
151
// TODO(b/181413732): Verify token below are named correctly
156
- .button-- icon-leading {
152
+ .icon-leading {
157
153
padding-inline-start : var (--_with-leading-icon-leading-space );
158
154
padding-inline-end : var (--_with-leading-icon-trailing-space );
159
155
}
160
156
161
- .button-- icon-trailing {
157
+ .icon-trailing {
162
158
padding-inline-start : var (--_with-trailing-icon-leading-space );
163
159
padding-inline-end : var (--_with-trailing-icon-trailing-space );
164
160
}
Original file line number Diff line number Diff line change 13
13
transform : translateY (-50% );
14
14
}
15
15
16
+ :host ([touch-target = ' wrapper' ]) {
17
+ margin : max (0px , (48px - var (--_container-height )) / 2 ) 0 ;
18
+ }
19
+
16
20
:host ([touch-target = ' none' ]) .touch {
17
21
display : none ;
18
22
}
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ export abstract class Button extends buttonBaseClass implements FormSubmitter {
137
137
138
138
protected getRenderClasses ( ) {
139
139
return {
140
- 'button-- icon-leading' : ! this . trailingIcon && this . hasIcon ,
141
- 'button-- icon-trailing' : this . trailingIcon && this . hasIcon ,
140
+ 'icon-leading' : ! this . trailingIcon && this . hasIcon ,
141
+ 'icon-trailing' : this . trailingIcon && this . hasIcon ,
142
142
} ;
143
143
}
144
144
@@ -154,12 +154,12 @@ export abstract class Button extends buttonBaseClass implements FormSubmitter {
154
154
@slotchange ="${ this . handleSlotChange } "> </ slot > ` ;
155
155
156
156
return html `
157
- ${ this . renderElevation ?.( ) } ${ this . renderOutline ?.( ) }
157
+ ${ this . renderElevation ?.( ) } ${ this . renderOutline ?.( ) }
158
158
< md-focus-ring part ="focus-ring "> </ md-focus-ring >
159
- < md-ripple class =" button__ripple " ?disabled ="${ isDisabled } "> </ md-ripple >
159
+ < md-ripple ?disabled ="${ isDisabled } "> </ md-ripple >
160
160
< span class ="touch "> </ span >
161
161
${ this . trailingIcon ? nothing : icon }
162
- < span class ="button__label "> < slot > </ slot > </ span >
162
+ < span class ="label "> < slot > </ slot > </ span >
163
163
${ this . trailingIcon ? icon : nothing }
164
164
` ;
165
165
}
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ import {Button} from './button.js';
13
13
*/
14
14
export class OutlinedButton extends Button {
15
15
protected override renderOutline ( ) {
16
- return html `< span class ="button__outline "> </ span > ` ;
16
+ return html `< span class ="outline "> </ span > ` ;
17
17
}
18
18
}
You can’t perform that action at this time.
0 commit comments