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

Commit

Permalink
chore(checkbox): Rename checkmark path for BEM (#2096)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
patrickrodee authored Jan 26, 2018
1 parent 2998a42 commit 015c66b
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion demos/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<input type="checkbox" class="mdc-checkbox__native-control" id="toggle-disabled" aria-labelledby="toggle-disabled-label">
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59">
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59">
</svg>
<div class="mdc-checkbox__mixedmark"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demos/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h2 class="mdc-card__subtitle">Subtitle here</h2>
<input type="checkbox" class="mdc-checkbox__native-control" id="toggle-rtl" aria-labelledby="toggle-rtl-label" />
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
</svg>
<div class="mdc-checkbox__mixedmark"></div>
</div>
Expand Down
40 changes: 20 additions & 20 deletions demos/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -98,7 +98,7 @@ <h2>CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -123,7 +123,7 @@ <h2>CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -142,7 +142,7 @@ <h2>CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -165,7 +165,7 @@ <h2>CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -185,7 +185,7 @@ <h2>CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -210,7 +210,7 @@ <h2>With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -235,7 +235,7 @@ <h2>With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -262,7 +262,7 @@ <h2>With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -286,7 +286,7 @@ <h2>With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down Expand Up @@ -314,7 +314,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -335,7 +335,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -355,7 +355,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -378,7 +378,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -398,7 +398,7 @@ <h2>Dark Theme (mdc-theme--dark) - With JavaScript</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -422,7 +422,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -443,7 +443,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -463,7 +463,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -486,7 +486,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -506,7 +506,7 @@ <h2>Dark Theme (mdc-checkbox--theme-dark) - CSS Only</h2>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down
2 changes: 1 addition & 1 deletion demos/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h2 id="mdc-dialog-with-list-label" class="mdc-dialog__header__title">
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down
2 changes: 1 addition & 1 deletion demos/grid-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<input type="checkbox" class="mdc-checkbox__native-control" id="toggle-rtl" aria-labelledby="toggle-rtl-label" />
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
</svg>
<div class="mdc-checkbox__mixedmark"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demos/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
aria-labelledby="toggle-rtl-label" />
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white"
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
</svg>
<div class="mdc-checkbox__mixedmark"></div>
Expand Down
6 changes: 3 additions & 3 deletions demos/snackbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h2 class="mdc-typography--title">Basic Example</h2>
<input type="checkbox" class="mdc-checkbox__native-control" id="multiline" aria-labelledby="multiline-label" />
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59" />
</svg>
<div class="mdc-checkbox__mixedmark"></div>
</div>
Expand All @@ -105,7 +105,7 @@ <h2 class="mdc-typography--title">Basic Example</h2>
<input type="checkbox" class="mdc-checkbox__native-control" id="action-on-bottom" aria-labelledby="action-on-bottom-label" />
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white"
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
</svg>
<div class="mdc-checkbox__mixedmark"></div>
Expand All @@ -120,7 +120,7 @@ <h2 class="mdc-typography--title">Basic Example</h2>
<input type="checkbox" checked class="mdc-checkbox__native-control" id="dismiss-on-action" aria-labelledby="dismiss-on-action-label" />
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path" fill="none" stroke="white"
<path class="mdc-checkbox__checkmark-path" fill="none" stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
</svg>
<div class="mdc-checkbox__mixedmark"></div>
Expand Down
6 changes: 3 additions & 3 deletions demos/theme/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ <h3 class="mdc-typography--headline demo-component-section__heading">
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -439,7 +439,7 @@ <h3 class="mdc-typography--headline demo-component-section__heading">
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand All @@ -459,7 +459,7 @@ <h3 class="mdc-typography--headline demo-component-section__heading">
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down
6 changes: 3 additions & 3 deletions packages/mdc-checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ npm install --save @material/checkbox
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down Expand Up @@ -76,7 +76,7 @@ easily position checkboxes and their labels.
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down Expand Up @@ -104,7 +104,7 @@ Note that `mdc-checkbox--disabled` is necessary on the root element of CSS-only
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down
10 changes: 5 additions & 5 deletions packages/mdc-checkbox/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
}

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

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

&-checked-unchecked {
.mdc-checkbox__checkmark__path {
.mdc-checkbox__checkmark-path {
animation: $mdc-checkbox-transition-duration linear 0s mdc-checkbox-checked-unchecked-checkmark-path;
transition: none;
}
Expand Down Expand Up @@ -352,7 +352,7 @@

// Check mark path

@mixin mdc-checkbox__checkmark__path_ {
@mixin mdc-checkbox__checkmark-path_ {
transition:
mdc-checkbox-transition-exit(
stroke-dashoffset,
Expand All @@ -364,7 +364,7 @@
stroke-dasharray: $mdc-checkbox-mark-path-length_;
}

@mixin mdc-checkbox__checkmark__path--marked_ {
@mixin mdc-checkbox__checkmark-path--marked_ {
stroke-dashoffset: 0;
}

Expand Down
10 changes: 5 additions & 5 deletions packages/mdc-checkbox/mdc-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
@include mdc-checkbox__checkmark_;
}

.mdc-checkbox__checkmark__path {
@include mdc-checkbox__checkmark__path_;
.mdc-checkbox__checkmark-path {
@include mdc-checkbox__checkmark-path_;
}

.mdc-checkbox__mixedmark {
Expand All @@ -64,7 +64,7 @@
.mdc-checkbox--upgraded {
.mdc-checkbox__background,
.mdc-checkbox__checkmark,
.mdc-checkbox__checkmark__path,
.mdc-checkbox__checkmark-path,
.mdc-checkbox__mixedmark {
@include mdc-checkbox__child--upgraded_;
}
Expand All @@ -78,8 +78,8 @@
.mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
@include mdc-checkbox__background--marked_;

.mdc-checkbox__checkmark__path {
@include mdc-checkbox__checkmark__path--marked_;
.mdc-checkbox__checkmark-path {
@include mdc-checkbox__checkmark-path--marked_;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-form-field/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ successive sibling is a `label` element. This means it will work for MDC Web for
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-checkbox/mdc-checkbox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getFixture() {
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark"
viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark__path"
<path class="mdc-checkbox__checkmark-path"
fill="none"
stroke="white"
d="M4.1,12.7 9,17.6 20.3,6.3"/>
Expand Down

0 comments on commit 015c66b

Please sign in to comment.