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

Commit

Permalink
chore(stylelint): Enable dollar-variable-pattern (#171)
Browse files Browse the repository at this point in the history
Remove all of the no longer needed // stylelint-disable / // stylelint-enable dollar-variable-pattern comments. Fixes #90.
  • Loading branch information
BBosman authored and traviskaufman committed Jan 11, 2017
1 parent 9ba020c commit 80ab598
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 46 deletions.
5 changes: 0 additions & 5 deletions packages/mdc-drawer/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
@import "@material/theme/mixins";
@import "@material/typography/mixins";

/* All variables are local, so disable pattern checking. */
/* stylelint-disable scss/dollar-variable-pattern */

@mixin mdc-drawer-toolbar-spacer_() {
&__toolbar-spacer {
display: flex;
Expand Down Expand Up @@ -141,5 +138,3 @@
@include mdc-drawer-header_;
@include mdc-drawer-list_;
}

/* stylelint-enable scss/dollar-variable-pattern */
4 changes: 0 additions & 4 deletions packages/mdc-list/mdc-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,12 @@
* the spec.
*/
@mixin mdc-list-start-detail-size_($size) {
/* stylelint-disable scss/dollar-variable-pattern */

$text-offset: 72px;
$side-padding: 16px;
$margin-value: $text-offset - $side-padding - $size;

@include mdc-list-detail-size_($size);
@include mdc-rtl-reflexive-box(margin, right, $margin-value, ".mdc-list-item");

/* stylelint-enable scss/dollar-variable-pattern */
}

/* postcss-bem-linter: define list */
Expand Down
8 changes: 0 additions & 8 deletions packages/mdc-ripple/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
}

@mixin mdc-ripple-color_($config) {
/* stylelint-disable scss/dollar-variable-pattern */
$base-color: map-get($config, base-color);
$opacity: map-get($config, opacity);
$theme-style: map-get($config, theme-style);
Expand All @@ -55,7 +54,6 @@
@if ($theme-style) {
$theme-value: map-get($mdc-theme-property-values, $theme-style);
$css-var: var(--mdc-theme-#{$theme-style}, $theme-value);
/* stylelint-enable scss/dollar-variable-pattern */

background-color: rgba($theme-value, $opacity);

Expand All @@ -72,9 +70,7 @@
}

@mixin mdc-ripple-bg-base_($config) {
/* stylelint-disable scss/dollar-variable-pattern */
$radius: map-get($config, radius);
/* stylelint-enable scss/dollar-variable-pattern */

@include mdc-ripple-color_($config);

Expand All @@ -91,10 +87,8 @@
}

@mixin mdc-ripple-bg($config: ()) {
/* stylelint-disable scss/dollar-variable-pattern */
$config: map-merge(mdc-ripple-default-config_(), $config);
$pseudo: map-get($config, pseudo);
/* stylelint-enable scss/dollar-variable-pattern */

/* stylelint-disable at-rule-empty-line-before, block-closing-brace-newline-after */
@if ($pseudo) {
Expand Down Expand Up @@ -146,10 +140,8 @@
}

@mixin mdc-ripple-fg($config: ()) {
/* stylelint-disable scss/dollar-variable-pattern */
$config: map-merge(mdc-ripple-default-config_(), $config);
$pseudo: map-get($config, pseudo);
/* stylelint-enable scss/dollar-variable-pattern */

/* stylelint-disable at-rule-empty-line-before, block-closing-brace-newline-after */
@if ($pseudo) {
Expand Down
12 changes: 0 additions & 12 deletions packages/mdc-rtl/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@
* trying to flip the values, use mdc-rtl-reflexive-property().
*/
@mixin mdc-rtl-reflexive-box($base-property, $default-direction, $value, $root-selector: null) {
/* stylelint-disable scss/dollar-variable-pattern */

@if (index((right, left), $default-direction) == null) {
@error "Invalid default direction #{default-direction}. Please specifiy either right or left";
}
Expand All @@ -146,8 +144,6 @@
}

@include mdc-rtl-reflexive-property($base-property, $left-value, $right-value, $root-selector);

/* stylelint-enable scss/dollar-variable-pattern */
}

/**
Expand Down Expand Up @@ -177,14 +173,10 @@
* A 4th optional $root-selector argument can be given, which will be passed to `mdc-rtl`.
*/
@mixin mdc-rtl-reflexive-property($base-property, $left-value, $right-value, $root-selector: null) {
/* stylelint-disable scss/dollar-variable-pattern */

$prop-left: #{$base-property}-left;
$prop-right: #{$base-property}-right;

@include mdc-rtl-reflexive_($prop-left, $left-value, $prop-right, $right-value, $root-selector);

/* stylelint-enable scss/dollar-variable-pattern */
}

/**
Expand Down Expand Up @@ -215,8 +207,6 @@
* An optional third $root-selector argument may also be given, which is passed to `mdc-rtl`.
*/
@mixin mdc-rtl-reflexive-position($pos, $value, $root-selector: null) {
/* stylelint-disable scss/dollar-variable-pattern */

@if (index((right, left), $pos) == null) {
@error "Invalid position #{pos}. Please specifiy either right or left";
}
Expand All @@ -230,8 +220,6 @@
}

@include mdc-rtl-reflexive_(left, $left-value, right, $right-value, $root-selector);

/* stylelint-enable scss/dollar-variable-pattern */
}

@mixin mdc-rtl-reflexive_(
Expand Down
2 changes: 0 additions & 2 deletions packages/mdc-select/mdc-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
@import "@material/rtl/mixins";

@mixin mdc-select-dd-arrow-svg-bg_($fill-hex-number: 000000, $opacity: .54) {
// stylelint-disable scss/dollar-variable-pattern
background-image: url(data:image/svg+xml,%3Csvg%20width%3D%2210px%22%20height%3D%225px%22%20viewBox%3D%227%2010%2010%205%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cpolygon%20id%3D%22Shape%22%20stroke%3D%22none%22%20fill%3D%22%23#{$fill-hex-number}%22%20fill-rule%3D%22evenodd%22%20opacity%3D%22#{$opacity}%22%20points%3D%227%2010%2012%2015%2017%2010%22%3E%3C%2Fpolygon%3E%0A%3C%2Fsvg%3E);
// stylelint-enable scss/dollar-variable-pattern
}

// postcss-bem-linter: define select
Expand Down
2 changes: 0 additions & 2 deletions packages/mdc-textfield/mdc-textfield.scss
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,9 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
}

.mdc-textfield--multiline {
/* stylelint-disable scss/dollar-variable-pattern */
$padding-inset: 4px;
$label-offset-y: $padding-inset + 2;
$label-offset-x: $padding-inset;
/* stylelint-enable scss/dollar-variable-pattern */

display: flex;
height: initial;
Expand Down
5 changes: 0 additions & 5 deletions packages/mdc-theme/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

@import "./constants";

/* All variables are local, so disable pattern checking. */
/* stylelint-disable scss/dollar-variable-pattern */

/**
* Calculate the luminance for a color.
* See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
Expand Down Expand Up @@ -60,5 +57,3 @@
@return "light";
}
}

/* stylelint-enable scss/dollar-variable-pattern */
5 changes: 0 additions & 5 deletions packages/mdc-theme/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

@import "./variables";

/* All variables are local, so disable pattern checking. */
/* stylelint-disable scss/dollar-variable-pattern */

/**
* Applies the correct theme color style to the specified property.
* $property is typically color or background-color, but can be any CSS property that accepts color values.
Expand Down Expand Up @@ -100,5 +97,3 @@
}
}
}

/* stylelint-enable scss/dollar-variable-pattern */
3 changes: 0 additions & 3 deletions packages/mdc-typography/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
* limitations under the License.
*/

// All variables are local, so disable pattern checking.
// stylelint-disable scss/dollar-variable-pattern

@import "./variables";

@mixin mdc-typography-base {
Expand Down

0 comments on commit 80ab598

Please sign in to comment.