Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): Lint button syntax #4629

Merged
merged 1 commit into from
Aug 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/mdl-button/mdl-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@import "variables";
@import "mdl-typography/mixins";

/* postcss-bem-linter: define button */
/* stylelint-disable declaration-property-unit-whitelist */
.mdl-button {
@include mdl-typography(body2);
Expand Down Expand Up @@ -51,6 +52,7 @@
content: "";
}

/* postcss-bem-linter: ignore */
&::before {
background: currentColor;
opacity: 0;
Expand Down Expand Up @@ -111,10 +113,12 @@
&--primary {
color: var(--mdl-theme-color-primary);

/* postcss-bem-linter: ignore */
&.mdl-button--raised {
background-color: var(--mdl-theme-color-primary);
color: rgba(0, 0, 0, .87);

/* postcss-bem-linter: ignore */
&::before {
color: black;
}
Expand All @@ -124,10 +128,12 @@
&--accent {
color: var(--mdl-theme-color-accent);

/* postcss-bem-linter: ignore */
&.mdl-button--raised {
background-color: var(--mdl-theme-color-accent);
color: rgba(0, 0, 0, .87);

/* postcss-bem-linter: ignore */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a postcss-bem-linter bug if you have to ignore it :/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not. BEM doesn't want you combining classes. It wants a single-class target to everything.

&::before {
color: black;
}
Expand All @@ -149,3 +155,5 @@
box-shadow: none;
}
}

/* postcss-bem-linter: end */