Skip to content

Commit

Permalink
chore(stylelint): Remove fr unit workaround (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
BBosman authored and sgomes committed Feb 8, 2017
1 parent dadf47a commit fe8d5d4
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 22 deletions.
14 changes: 2 additions & 12 deletions .stylelintrc.yaml
Expand Up @@ -6,6 +6,7 @@ ignoreFiles:
plugins:
- stylelint-selector-bem-pattern
- stylelint-scss
- stylelint-order
rules:
# Follow best practices
font-family-name-quotes: always-where-recommended
Expand All @@ -18,7 +19,7 @@ rules:
# attribute strings are normally quoted within the DOM.
string-quotes: double
# https://github.com/sasstools/sass-lint/blob/develop/lib/config/property-sort-orders/smacss.yml
declaration-block-properties-order:
order/declaration-block-properties-specified-order:
- display
- position
- top
Expand Down Expand Up @@ -231,9 +232,6 @@ rules:
selector-id-pattern: ^mdc?-.+
# Names are more semantic than numbers
font-weight-notation: named-where-possible
# :root is an important enough selector that it always stands on it's own. Also, there is no
# reason to make root a compound selector (?)
selector-root-no-composition: true
# http://www.paulirish.com/2010/the-protocol-relative-url/
function-url-no-scheme-relative: true
# TODO: and FIXME: warnings are super useful because they remind us that we should address these
Expand All @@ -245,14 +243,6 @@ rules:
- severity: warning
# Part of google's style guide
number-leading-zero: never
# No unknown unit
unit-no-unknown:
- true
# Temporary rule to ignore CSS Grid `fr` unit while stylelint doesn't support it.
# See https://github.com/stylelint/stylelint/issues/2307
# TODO(sgomes): remove once fixed in stylelint
- ignoreUnits:
- fr

# We use Harry Roberts' BEM dialect as our preferred way to format classes.
# See: http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -66,8 +66,9 @@
"standard-changelog": "0.0.1",
"style-loader": "^0.13.1",
"stylefmt": "^4.1.1",
"stylelint": "^7.1.0",
"stylelint-config-standard": "^11.0.0",
"stylelint": "^7.8.0",
"stylelint-config-standard": "^16.0.0",
"stylelint-order": "^0.2.2",
"stylelint-scss": "^1.2.1",
"stylelint-selector-bem-pattern": "^1.0.0",
"tape": "^4.6.0",
Expand Down
1 change: 1 addition & 0 deletions packages/mdc-button/mdc-button.scss
Expand Up @@ -49,6 +49,7 @@

@include mdc-theme-dark {
@include mdc-theme-prop(color, text-primary-on-dark);

-webkit-tap-highlight-color: rgba(white, .18);
}

Expand Down
1 change: 1 addition & 0 deletions packages/mdc-drawer/temporary/mdc-temporary-drawer.scss
Expand Up @@ -98,6 +98,7 @@

&__footer {
@include mdc-elevation(2);

flex-shrink: 0;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/mdc-layout-grid/_mixins.scss
Expand Up @@ -67,7 +67,6 @@
align-items: stretch;
margin: 0 auto;
box-sizing: border-box;

padding: $margin - $gutter / 2;
padding: calc(var(--mdc-layout-grid-margin, #{$margin}) - var(--mdc-layout-grid-gutter, #{$gutter}) / 2);

Expand All @@ -79,7 +78,6 @@
display: grid;
grid-gap: $gutter;
grid-gap: var(--mdc-layout-grid-gutter, $gutter);

padding: $margin;
padding: var(--mdc-layout-grid-margin, #{$margin});

Expand Down
1 change: 1 addition & 0 deletions packages/mdc-menu/simple/mdc-simple-menu.scss
Expand Up @@ -79,6 +79,7 @@ $mdc-simple-menu-item-fade-duration: .3s;

.mdc-simple-menu--animating & {
overflow-y: hidden;

> * {
transition-duration: $mdc-simple-menu-item-fade-duration;
transition-property: opacity;
Expand Down
1 change: 0 additions & 1 deletion packages/mdc-select/mdc-select.scss
Expand Up @@ -244,7 +244,6 @@
@include mdc-theme-dark {
@include mdc-theme-prop(background-color, text-primary-on-dark);
}

}
// stylelint-enable plugin/selector-bem-pattern
}
Expand Down
6 changes: 1 addition & 5 deletions packages/mdc-switch/mdc-switch.scss
Expand Up @@ -70,7 +70,6 @@
background-color: $mdc-switch-unchecked-track-color-dark;
opacity: .3;
}

}

// postcss-bem-linter: ignore
Expand Down Expand Up @@ -117,7 +116,6 @@
}

.mdc-switch__native-control:focus ~ .mdc-switch__background {

.mdc-switch__knob {
&::before {
position: absolute;
Expand All @@ -134,15 +132,14 @@
background-color: $mdc-switch-unchecked-focus-ring-color-dark;
opacity: .14;
}

}
}
}

.mdc-switch__native-control:checked ~ .mdc-switch__background {

&::before {
@include mdc-theme-prop(background-color, primary);

opacity: .5;
}

Expand Down Expand Up @@ -173,7 +170,6 @@
}

.mdc-switch__native-control:disabled ~ .mdc-switch__background {

&::before {
background-color: $mdc-switch-unchecked-track-color;
opacity: .12;
Expand Down

0 comments on commit fe8d5d4

Please sign in to comment.