This repository was archived by the owner on Jan 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +93
-0
lines changed Expand file tree Collapse file tree 3 files changed +93
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,30 @@ <h1 class="mdc-typography--display2">Ripple Enabled</h1>
201
201
</ div >
202
202
</ fieldset >
203
203
204
+ < fieldset >
205
+ < legend class ="mdc-typography--title "> Stroked Button</ legend >
206
+ < div >
207
+ < button class ="mdc-button mdc-button--stroked ">
208
+ Baseline
209
+ </ button >
210
+ < button class ="mdc-button mdc-button--stroked mdc-button--compact ">
211
+ Compact
212
+ </ button >
213
+ < button class ="mdc-button mdc-button--stroked mdc-button--dense ">
214
+ Dense
215
+ </ button >
216
+ < button class ="mdc-button mdc-button--stroked mdc-button--primary ">
217
+ Primary
218
+ </ button >
219
+ < button class ="mdc-button mdc-button--stroked mdc-button--accent ">
220
+ Secondary
221
+ </ button >
222
+ < a href ="javascript:void(0) " class ="mdc-button mdc-button--stroked ">
223
+ Link
224
+ </ a >
225
+ </ div >
226
+ </ fieldset >
227
+
204
228
< h1 class ="mdc-typography--display2 "> CSS Only</ h1 >
205
229
< fieldset >
206
230
< legend class ="mdc-typography--title "> Text Button</ legend >
@@ -273,6 +297,30 @@ <h1 class="mdc-typography--display2">CSS Only</h1>
273
297
</ a >
274
298
</ div >
275
299
</ fieldset >
300
+
301
+ < fieldset >
302
+ < legend class ="mdc-typography--title "> Stroked Button</ legend >
303
+ < div >
304
+ < button class ="mdc-button mdc-button--stroked " data-demo-no-js >
305
+ Baseline
306
+ </ button >
307
+ < button class ="mdc-button mdc-button--stroked mdc-button--compact " data-demo-no-js >
308
+ Compact
309
+ </ button >
310
+ < button class ="mdc-button mdc-button--stroked mdc-button--dense " data-demo-no-js >
311
+ Dense
312
+ </ button >
313
+ < button class ="mdc-button mdc-button--stroked mdc-button--primary " data-demo-no-js >
314
+ Primary
315
+ </ button >
316
+ < button class ="mdc-button mdc-button--stroked mdc-button--accent " data-demo-no-js >
317
+ Secondary
318
+ </ button >
319
+ < a href ="javascript:void(0) " class ="mdc-button mdc-button--stroked " data-demo-no-js >
320
+ Link
321
+ </ a >
322
+ </ div >
323
+ </ fieldset >
276
324
</ section >
277
325
</ main >
278
326
Original file line number Diff line number Diff line change @@ -71,6 +71,14 @@ semantically correct.
71
71
</button >
72
72
```
73
73
74
+ #### Stroked Button
75
+
76
+ ``` html
77
+ <button class =" mdc-button mdc-button--stroked" >
78
+ Stroked button
79
+ </button >
80
+ ```
81
+
74
82
### Button state
75
83
76
84
#### Disabled
@@ -138,6 +146,7 @@ The provided modifiers are:
138
146
| --------------------- | ------------------------------------------------------- |
139
147
| ` mdc-button--raised ` | A contained button that is elevated upon the surface. |
140
148
| ` mdc-button--unelevated ` | A contained button that is flush with the surface. |
149
+ | ` mdc-button--stroked ` | A contained button that is flush with the surface and has a visible border. |
141
150
| ` mdc-button--dense ` | Compresses the button text to make it slightly smaller. |
142
151
| ` mdc-button--compact ` | Reduces the amount of horizontal padding in the button. |
143
152
| ` mdc-button--primary ` | Colors the button with the primary color. |
Original file line number Diff line number Diff line change 94
94
}
95
95
}
96
96
97
+ .mdc-button--stroked {
98
+ @include mdc-theme-prop (border-color , text- primary- on- light);
99
+
100
+ border-width : 2px ;
101
+ border-style : solid ;
102
+ line-height : 32px ;
103
+
104
+ @include mdc-theme-dark (" .mdc-button" ) {
105
+ @include mdc-theme-prop (border-color , text- primary- on- dark);
106
+ }
107
+
108
+ // postcss-bem-linter: ignore
109
+ & .mdc-button--dense {
110
+ line-height : 27px ; // To accommodate odd font size of dense button
111
+ }
112
+ }
113
+
97
114
.mdc-button--compact {
98
115
padding : 0 8px ;
99
116
}
134
151
@include mdc-theme-prop (background-color , $theme-style );
135
152
@include mdc-theme-prop (color , text- primary- on- #{$theme-style } );
136
153
}
154
+ // postcss-bem-linter: ignore
155
+ & .mdc-button--stroked {
156
+ @include mdc-theme-prop (border-color , $theme-style );
157
+
158
+ @include mdc-theme-dark (" .mdc-button" ) {
159
+ @include mdc-theme-prop (border-color , $theme-style );
160
+ }
161
+ }
137
162
}
138
163
}
139
164
168
193
}
169
194
}
170
195
}
196
+
197
+ .mdc-button--stroked {
198
+ fieldset :disabled & ,
199
+ & :disabled {
200
+ border-color : rgba (black , .38 );
201
+
202
+ @include mdc-theme-dark (" .mdc-button" ) {
203
+ @include mdc-theme-prop (border-color , text- disabled- on- dark);
204
+ }
205
+ }
206
+ }
171
207
// postcss-bem-linter: end
You can’t perform that action at this time.
0 commit comments