Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 015c66b

Browse files
authored
chore(checkbox): Rename checkmark path for BEM (#2096)
Change `mdc-checkbox__checkmark__path` to `mdc-checkbox__checkmark-path` across all files. BREAKING CHANGE: all checkboxes need to update the SVG path's class from `mdc-checkbox__checkmark__path` to `mdc-checkbox__checkmark-path`.
1 parent 2998a42 commit 015c66b

File tree

13 files changed

+46
-46
lines changed

13 files changed

+46
-46
lines changed

demos/button.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<input type="checkbox" class="mdc-checkbox__native-control" id="toggle-disabled" aria-labelledby="toggle-disabled-label">
100100
<div class="mdc-checkbox__background">
101101
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
102-
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59">
102+
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59">
103103
</svg>
104104
<div class="mdc-checkbox__mixedmark"></div>
105105
</div>

demos/card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ <h2 class="mdc-card__subtitle">Subtitle here</h2>
149149
<input type="checkbox" class="mdc-checkbox__native-control" id="toggle-rtl" aria-labelledby="toggle-rtl-label" />
150150
<div class="mdc-checkbox__background">
151151
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
152-
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
152+
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
153153
</svg>
154154
<div class="mdc-checkbox__mixedmark"></div>
155155
</div>

demos/checkbox.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<div class="mdc-checkbox__background">
7777
<svg class="mdc-checkbox__checkmark"
7878
viewBox="0 0 24 24">
79-
<path class="mdc-checkbox__checkmark__path"
79+
<path class="mdc-checkbox__checkmark-path"
8080
fill="none"
8181
stroke="white"
8282
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -98,7 +98,7 @@ <h2>CSS Only</h2>
9898
<div class="mdc-checkbox__background">
9999
<svg class="mdc-checkbox__checkmark"
100100
viewBox="0 0 24 24">
101-
<path class="mdc-checkbox__checkmark__path"
101+
<path class="mdc-checkbox__checkmark-path"
102102
fill="none"
103103
stroke="white"
104104
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -123,7 +123,7 @@ <h2>CSS Only</h2>
123123
<div class="mdc-checkbox__background">
124124
<svg class="mdc-checkbox__checkmark"
125125
viewBox="0 0 24 24">
126-
<path class="mdc-checkbox__checkmark__path"
126+
<path class="mdc-checkbox__checkmark-path"
127127
fill="none"
128128
stroke="white"
129129
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -142,7 +142,7 @@ <h2>CSS Only</h2>
142142
<div class="mdc-checkbox__background">
143143
<svg class="mdc-checkbox__checkmark"
144144
viewBox="0 0 24 24">
145-
<path class="mdc-checkbox__checkmark__path"
145+
<path class="mdc-checkbox__checkmark-path"
146146
fill="none"
147147
stroke="white"
148148
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -165,7 +165,7 @@ <h2>CSS Only</h2>
165165
<div class="mdc-checkbox__background">
166166
<svg class="mdc-checkbox__checkmark"
167167
viewBox="0 0 24 24">
168-
<path class="mdc-checkbox__checkmark__path"
168+
<path class="mdc-checkbox__checkmark-path"
169169
fill="none"
170170
stroke="white"
171171
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -185,7 +185,7 @@ <h2>CSS Only</h2>
185185
<div class="mdc-checkbox__background">
186186
<svg class="mdc-checkbox__checkmark"
187187
viewBox="0 0 24 24">
188-
<path class="mdc-checkbox__checkmark__path"
188+
<path class="mdc-checkbox__checkmark-path"
189189
fill="none"
190190
stroke="white"
191191
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -210,7 +210,7 @@ <h2>With JavaScript</h2>
210210
<div class="mdc-checkbox__background">
211211
<svg class="mdc-checkbox__checkmark"
212212
viewBox="0 0 24 24">
213-
<path class="mdc-checkbox__checkmark__path"
213+
<path class="mdc-checkbox__checkmark-path"
214214
fill="none"
215215
stroke="white"
216216
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -235,7 +235,7 @@ <h2>With JavaScript</h2>
235235
<div class="mdc-checkbox__background">
236236
<svg class="mdc-checkbox__checkmark"
237237
viewBox="0 0 24 24">
238-
<path class="mdc-checkbox__checkmark__path"
238+
<path class="mdc-checkbox__checkmark-path"
239239
fill="none"
240240
stroke="white"
241241
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -262,7 +262,7 @@ <h2>With JavaScript</h2>
262262
<div class="mdc-checkbox__background">
263263
<svg class="mdc-checkbox__checkmark"
264264
viewBox="0 0 24 24">
265-
<path class="mdc-checkbox__checkmark__path"
265+
<path class="mdc-checkbox__checkmark-path"
266266
fill="none"
267267
stroke="white"
268268
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -286,7 +286,7 @@ <h2>With JavaScript</h2>
286286
<div class="mdc-checkbox__background">
287287
<svg class="mdc-checkbox__checkmark"
288288
viewBox="0 0 24 24">
289-
<path class="mdc-checkbox__checkmark__path"
289+
<path class="mdc-checkbox__checkmark-path"
290290
fill="none"
291291
stroke="white"
292292
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -314,7 +314,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
314314
<div class="mdc-checkbox__background">
315315
<svg class="mdc-checkbox__checkmark"
316316
viewBox="0 0 24 24">
317-
<path class="mdc-checkbox__checkmark__path"
317+
<path class="mdc-checkbox__checkmark-path"
318318
fill="none"
319319
stroke="white"
320320
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -335,7 +335,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
335335
<div class="mdc-checkbox__background">
336336
<svg class="mdc-checkbox__checkmark"
337337
viewBox="0 0 24 24">
338-
<path class="mdc-checkbox__checkmark__path"
338+
<path class="mdc-checkbox__checkmark-path"
339339
fill="none"
340340
stroke="white"
341341
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -355,7 +355,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
355355
<div class="mdc-checkbox__background">
356356
<svg class="mdc-checkbox__checkmark"
357357
viewBox="0 0 24 24">
358-
<path class="mdc-checkbox__checkmark__path"
358+
<path class="mdc-checkbox__checkmark-path"
359359
fill="none"
360360
stroke="white"
361361
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -378,7 +378,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
378378
<div class="mdc-checkbox__background">
379379
<svg class="mdc-checkbox__checkmark"
380380
viewBox="0 0 24 24">
381-
<path class="mdc-checkbox__checkmark__path"
381+
<path class="mdc-checkbox__checkmark-path"
382382
fill="none"
383383
stroke="white"
384384
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -398,7 +398,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
398398
<div class="mdc-checkbox__background">
399399
<svg class="mdc-checkbox__checkmark"
400400
viewBox="0 0 24 24">
401-
<path class="mdc-checkbox__checkmark__path"
401+
<path class="mdc-checkbox__checkmark-path"
402402
fill="none"
403403
stroke="white"
404404
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -422,7 +422,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
422422
<div class="mdc-checkbox__background">
423423
<svg class="mdc-checkbox__checkmark"
424424
viewBox="0 0 24 24">
425-
<path class="mdc-checkbox__checkmark__path"
425+
<path class="mdc-checkbox__checkmark-path"
426426
fill="none"
427427
stroke="white"
428428
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -443,7 +443,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
443443
<div class="mdc-checkbox__background">
444444
<svg class="mdc-checkbox__checkmark"
445445
viewBox="0 0 24 24">
446-
<path class="mdc-checkbox__checkmark__path"
446+
<path class="mdc-checkbox__checkmark-path"
447447
fill="none"
448448
stroke="white"
449449
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -463,7 +463,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
463463
<div class="mdc-checkbox__background">
464464
<svg class="mdc-checkbox__checkmark"
465465
viewBox="0 0 24 24">
466-
<path class="mdc-checkbox__checkmark__path"
466+
<path class="mdc-checkbox__checkmark-path"
467467
fill="none"
468468
stroke="white"
469469
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -486,7 +486,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
486486
<div class="mdc-checkbox__background">
487487
<svg class="mdc-checkbox__checkmark"
488488
viewBox="0 0 24 24">
489-
<path class="mdc-checkbox__checkmark__path"
489+
<path class="mdc-checkbox__checkmark-path"
490490
fill="none"
491491
stroke="white"
492492
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -506,7 +506,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
506506
<div class="mdc-checkbox__background">
507507
<svg class="mdc-checkbox__checkmark"
508508
viewBox="0 0 24 24">
509-
<path class="mdc-checkbox__checkmark__path"
509+
<path class="mdc-checkbox__checkmark-path"
510510
fill="none"
511511
stroke="white"
512512
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>

demos/dialog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ <h2 id="mdc-dialog-with-list-label" class="mdc-dialog__header__title">
178178
<div class="mdc-checkbox__background">
179179
<svg class="mdc-checkbox__checkmark"
180180
viewBox="0 0 24 24">
181-
<path class="mdc-checkbox__checkmark__path"
181+
<path class="mdc-checkbox__checkmark-path"
182182
fill="none"
183183
stroke="white"
184184
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>

demos/grid-list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<input type="checkbox" class="mdc-checkbox__native-control" id="toggle-rtl" aria-labelledby="toggle-rtl-label" />
9595
<div class="mdc-checkbox__background">
9696
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
97-
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
97+
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
9898
</svg>
9999
<div class="mdc-checkbox__mixedmark"></div>
100100
</div>

demos/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
aria-labelledby="toggle-rtl-label" />
104104
<div class="mdc-checkbox__background">
105105
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
106-
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white"
106+
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white"
107107
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
108108
</svg>
109109
<div class="mdc-checkbox__mixedmark"></div>

demos/snackbar.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ <h2 class="mdc-typography--title">Basic Example</h2>
9191
<input type="checkbox" class="mdc-checkbox__native-control" id="multiline" aria-labelledby="multiline-label" />
9292
<div class="mdc-checkbox__background">
9393
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
94-
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
94+
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
9595
</svg>
9696
<div class="mdc-checkbox__mixedmark"></div>
9797
</div>
@@ -105,7 +105,7 @@ <h2 class="mdc-typography--title">Basic Example</h2>
105105
<input type="checkbox" class="mdc-checkbox__native-control" id="action-on-bottom" aria-labelledby="action-on-bottom-label" />
106106
<div class="mdc-checkbox__background">
107107
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
108-
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white"
108+
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white"
109109
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
110110
</svg>
111111
<div class="mdc-checkbox__mixedmark"></div>
@@ -120,7 +120,7 @@ <h2 class="mdc-typography--title">Basic Example</h2>
120120
<input type="checkbox" checked class="mdc-checkbox__native-control" id="dismiss-on-action" aria-labelledby="dismiss-on-action-label" />
121121
<div class="mdc-checkbox__background">
122122
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
123-
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white"
123+
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white"
124124
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
125125
</svg>
126126
<div class="mdc-checkbox__mixedmark"></div>

demos/theme/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ <h3 class="mdc-typography--headline demo-component-section__heading">
420420
<div class="mdc-checkbox__background">
421421
<svg class="mdc-checkbox__checkmark"
422422
viewBox="0 0 24 24">
423-
<path class="mdc-checkbox__checkmark__path"
423+
<path class="mdc-checkbox__checkmark-path"
424424
fill="none"
425425
stroke="white"
426426
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -439,7 +439,7 @@ <h3 class="mdc-typography--headline demo-component-section__heading">
439439
<div class="mdc-checkbox__background">
440440
<svg class="mdc-checkbox__checkmark"
441441
viewBox="0 0 24 24">
442-
<path class="mdc-checkbox__checkmark__path"
442+
<path class="mdc-checkbox__checkmark-path"
443443
fill="none"
444444
stroke="white"
445445
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -459,7 +459,7 @@ <h3 class="mdc-typography--headline demo-component-section__heading">
459459
<div class="mdc-checkbox__background">
460460
<svg class="mdc-checkbox__checkmark"
461461
viewBox="0 0 24 24">
462-
<path class="mdc-checkbox__checkmark__path"
462+
<path class="mdc-checkbox__checkmark-path"
463463
fill="none"
464464
stroke="white"
465465
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>

packages/mdc-checkbox/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ npm install --save @material/checkbox
4747
<div class="mdc-checkbox__background">
4848
<svg class="mdc-checkbox__checkmark"
4949
viewBox="0 0 24 24">
50-
<path class="mdc-checkbox__checkmark__path"
50+
<path class="mdc-checkbox__checkmark-path"
5151
fill="none"
5252
stroke="white"
5353
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -76,7 +76,7 @@ easily position checkboxes and their labels.
7676
<div class="mdc-checkbox__background">
7777
<svg class="mdc-checkbox__checkmark"
7878
viewBox="0 0 24 24">
79-
<path class="mdc-checkbox__checkmark__path"
79+
<path class="mdc-checkbox__checkmark-path"
8080
fill="none"
8181
stroke="white"
8282
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
@@ -104,7 +104,7 @@ Note that `mdc-checkbox--disabled` is necessary on the root element of CSS-only
104104
<div class="mdc-checkbox__background">
105105
<svg class="mdc-checkbox__checkmark"
106106
viewBox="0 0 24 24">
107-
<path class="mdc-checkbox__checkmark__path"
107+
<path class="mdc-checkbox__checkmark-path"
108108
fill="none"
109109
stroke="white"
110110
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>

packages/mdc-checkbox/_mixins.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
}
6969

7070
@mixin mdc-checkbox-ink-color($color) {
71-
.mdc-checkbox__checkmark__path {
71+
.mdc-checkbox__checkmark-path {
7272
// !important is needed here because a stroke must be set as an attribute on the SVG in order
7373
// for line animation to work properly.
7474
@include mdc-theme-prop(stroke, $color, $important: true);
@@ -162,7 +162,7 @@
162162
}
163163

164164
&-unchecked-checked {
165-
.mdc-checkbox__checkmark__path {
165+
.mdc-checkbox__checkmark-path {
166166
// Instead of delaying the animation, we simply multiply its length by 2 and begin the
167167
// animation at 50% in order to prevent a flash of styles applied to a checked checkmark
168168
// as the background is fading in before the animation begins.
@@ -179,7 +179,7 @@
179179
}
180180

181181
&-checked-unchecked {
182-
.mdc-checkbox__checkmark__path {
182+
.mdc-checkbox__checkmark-path {
183183
animation: $mdc-checkbox-transition-duration linear 0s mdc-checkbox-checked-unchecked-checkmark-path;
184184
transition: none;
185185
}
@@ -352,7 +352,7 @@
352352

353353
// Check mark path
354354

355-
@mixin mdc-checkbox__checkmark__path_ {
355+
@mixin mdc-checkbox__checkmark-path_ {
356356
transition:
357357
mdc-checkbox-transition-exit(
358358
stroke-dashoffset,
@@ -364,7 +364,7 @@
364364
stroke-dasharray: $mdc-checkbox-mark-path-length_;
365365
}
366366

367-
@mixin mdc-checkbox__checkmark__path--marked_ {
367+
@mixin mdc-checkbox__checkmark-path--marked_ {
368368
stroke-dashoffset: 0;
369369
}
370370

0 commit comments

Comments
 (0)