From: Nicolas Coden Date: Tue, 15 Nov 2016 18:08:21 +0000 (+0100) Subject: Sass lint: replace scss-lint disable comments X-Git-Tag: v6.3-rc1~2^2~5^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffc43f62274fe498a3ad40db90d639ab03258c71;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Sass lint: replace scss-lint disable comments - Replace `scss-lint` disable comments with the `sass-lint` ones - Remove `scss-lint` disable comments when they are useless or not supported --- diff --git a/scss/_global.scss b/scss/_global.scss index 1c5f87061..4ed320ab3 100644 --- a/scss/_global.scss +++ b/scss/_global.scss @@ -2,7 +2,7 @@ // foundation.zurb.com // Licensed under MIT Open Source -// scss-lint:disable ColorVariable, QualifyingElement, VendorPrefix +// sass-lint:disable force-attribute-nesting, force-pseudo-nesting, no-color-literals, no-qualifying-elements //// /// @group global @@ -176,8 +176,7 @@ $-zf-flex-classes-imported: false; } // Styles Google Maps and MapQuest embeds properly - // scss-lint:disable IdSelector - #map_canvas, + // sass-lint:disable-line no-ids .map_canvas, .mqa-display { img, diff --git a/scss/components/_button-group.scss b/scss/components/_button-group.scss index ddc772771..6f6fc1960 100644 --- a/scss/components/_button-group.scss +++ b/scss/components/_button-group.scss @@ -89,10 +89,9 @@ $buttongroup-radius-on-each: true !default; } } - // scss-lint:disable ZeroUnit #{$selector} { @if $global-flexbox { - flex: 1 1 0px; + flex: 1 1 0px; // sass-lint:disable-line zero-unit } @else { @for $i from 2 through $buttongroup-expand-max { @@ -157,10 +156,9 @@ $buttongroup-radius-on-each: true !default; @mixin button-group-unstack( $selector: $buttongroup-child-selector ) { - // scss-lint:disable ZeroUnit #{$selector} { @if $global-flexbox { - flex: 1 1 0px; + flex: 1 1 0px; // sass-lint:disable-line zero-unit } @else { width: auto; @@ -231,8 +229,7 @@ $buttongroup-radius-on-each: true !default; } } - // scss-lint:disable MergeableSelector - &.stacked-for-small.expanded { + &.stacked-for-small.expanded { // sass-lint:disable-line force-element-nesting @include breakpoint(small only) { display: block; diff --git a/scss/components/_dropdown-menu.scss b/scss/components/_dropdown-menu.scss index a9b824223..5dceed626 100644 --- a/scss/components/_dropdown-menu.scss +++ b/scss/components/_dropdown-menu.scss @@ -215,7 +215,6 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1); } // [TODO] Cut back specificity - // scss-lint:disable SelectorDepth //&:not(.js-dropdown-nohover) > .is-dropdown-submenu-parent:hover > &, // why is this line needed? Opening is handled by JS and this causes some ugly flickering when the sub is re-positioned automatically... &.js-dropdown-active { display: block; diff --git a/scss/components/_media-object.scss b/scss/components/_media-object.scss index c8222f61a..3c85f46f5 100644 --- a/scss/components/_media-object.scss +++ b/scss/components/_media-object.scss @@ -97,9 +97,8 @@ $mediaobject-image-width-stacked: 100% !default; @include media-object-section; @if $global-flexbox { - // scss-lint:disable ZeroUnit &.main-section { - flex: 1 1 0px; + flex: 1 1 0px; // sass-lint:disable-line zero-unit } } @else { diff --git a/scss/components/_menu.scss b/scss/components/_menu.scss index 7cafc0657..97bf21a87 100644 --- a/scss/components/_menu.scss +++ b/scss/components/_menu.scss @@ -83,9 +83,8 @@ $menu-border: $light-gray !default; /// Expands the items of a Menu, so each item is the same width. @mixin menu-expand { @if $global-flexbox { - // scss-lint:disable ZeroUnit > li { - flex: 1 1 0px; + flex: 1 1 0px; // sass-lint:disable-line zero-unit } } @else { diff --git a/scss/components/_reveal.scss b/scss/components/_reveal.scss index 5a3c15c6f..c226a19a4 100644 --- a/scss/components/_reveal.scss +++ b/scss/components/_reveal.scss @@ -97,14 +97,13 @@ $reveal-overlay-background: rgba($black, 0.45) !default; /// Creates a full-screen modal, which stretches the full width and height of the window. @mixin reveal-modal-fullscreen { - // scss-lint:disable DuplicateProperty top: 0; left: 0; width: 100%; max-width: none; height: 100%; - height: 100vh; + height: 100vh; // sass-lint:disable-line no-duplicate-properties min-height: 100vh; margin-left: 0; @@ -114,8 +113,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default; @mixin foundation-reveal { // [TODO] Is this necessary? - // scss-lint:disable QualifyingElement - body.is-reveal-open { + body.is-reveal-open { // sass-lint:disable-line no-qualifying-elements overflow: hidden; } diff --git a/scss/components/_table.scss b/scss/components/_table.scss index c17eccc95..388f1d73e 100644 --- a/scss/components/_table.scss +++ b/scss/components/_table.scss @@ -2,7 +2,7 @@ // foundation.zurb.com // Licensed under MIT Open Source -// scss-lint:disable MergeableSelector, QualifyingElement +// sass-lint:disable force-element-nesting, no-qualifying-elements //// /// @group table diff --git a/scss/components/_title-bar.scss b/scss/components/_title-bar.scss index 94bd94bec..de754c7f3 100644 --- a/scss/components/_title-bar.scss +++ b/scss/components/_title-bar.scss @@ -56,10 +56,9 @@ $titlebar-icon-spacing: 0.25rem !default; } @if $global-flexbox { - // scss-lint:disable ZeroUnit .title-bar-left, .title-bar-right { - flex: 1 1 0px; + flex: 1 1 0px; // sass-lint:disable-line zero-unit } .title-bar-right { diff --git a/scss/components/_top-bar.scss b/scss/components/_top-bar.scss index d84ec6a8d..e216c2aa1 100644 --- a/scss/components/_top-bar.scss +++ b/scss/components/_top-bar.scss @@ -68,8 +68,7 @@ $topbar-unstack-breakpoint: medium !default; margin-#{$global-right}: 0; } - // scss-lint:disable QualifyingElement - input.button { + input.button { // sass-lint:disable-line no-qualifying-elements width: auto; } } @@ -100,7 +99,6 @@ $topbar-unstack-breakpoint: medium !default; @if $global-flexbox { flex-wrap: nowrap; - // scss-lint:disable ZeroUnit .top-bar-left { flex: 1 1 auto; } diff --git a/scss/forms/_input-group.scss b/scss/forms/_input-group.scss index 1e32da5e9..33995a7c4 100644 --- a/scss/forms/_input-group.scss +++ b/scss/forms/_input-group.scss @@ -89,9 +89,8 @@ $input-prefix-padding: 1rem !default; @extend %input-group-child; border-radius: 0; - // scss-lint:disable ZeroUnit @if $global-flexbox { - flex: 1 1 0px; + flex: 1 1 0px; // sass-lint:disable-line zero-unit height: auto; } @else { @@ -127,7 +126,6 @@ $input-prefix-padding: 1rem !default; } // Specificity bump needed to prevent override by buttons - // scss-lint:disable QualifyingSelector @if not $global-flexbox { .input-group .input-group-button { display: table-cell; diff --git a/scss/forms/_range.scss b/scss/forms/_range.scss index 4c032b6d7..b5766419d 100644 --- a/scss/forms/_range.scss +++ b/scss/forms/_range.scss @@ -39,8 +39,7 @@ $slider-opacity-disabled: 0.25 !default; $slider-radius: $global-radius !default; @mixin foundation-range-input { - // scss-lint:disable QualifyingElement - input[type="range"] { + input[type="range"] { // sass-lint:disable-line no-qualifying-elements $margin: ($slider-handle-height - $slider-height) / 2; display: block; diff --git a/scss/forms/_text.scss b/scss/forms/_text.scss index 1df2c89ad..87406fc0c 100644 --- a/scss/forms/_text.scss +++ b/scss/forms/_text.scss @@ -151,8 +151,7 @@ $form-button-radius: $global-radius !default; } // Reset Normalize setting content-box to search elements - // scss-lint:disable QualifyingElement - input[type='search'] { + input[type='search'] { // sass-lint:disable-line no-qualifying-elements box-sizing: border-box; } diff --git a/scss/grid/_classes.scss b/scss/grid/_classes.scss index 0bf814a71..e2c46c00b 100644 --- a/scss/grid/_classes.scss +++ b/scss/grid/_classes.scss @@ -156,7 +156,7 @@ @if $column == 'column' { .columns { - // scss-lint:disable PlaceholderInExtend + // sass-lint:disable-block placeholder-in-extend @extend .column; } } diff --git a/scss/grid/_flex-grid.scss b/scss/grid/_flex-grid.scss index 2b7aa4dc4..a7919c892 100644 --- a/scss/grid/_flex-grid.scss +++ b/scss/grid/_flex-grid.scss @@ -57,8 +57,7 @@ /// /// @param {Mixed} $columns [expand] - Width of the column. @function flex-grid-column($columns: expand) { - // scss-lint:disable ZeroUnit - $flex: 1 1 0px; + $flex: 1 1 0px; // sass-lint:disable-line zero-unit @if $columns == shrink { $flex: 0 0 auto; @@ -318,7 +317,7 @@ } .columns { - // scss-lint:disable PlaceholderInExtend - @extend .column; + @extend .column; // sass-lint:disable-line placeholder-in-extend + } } diff --git a/scss/grid/_grid.scss b/scss/grid/_grid.scss index 056c4380b..eab0dc1c8 100644 --- a/scss/grid/_grid.scss +++ b/scss/grid/_grid.scss @@ -37,7 +37,6 @@ $-zf-end-float: if($grid-column-align-edge, $global-right, $global-left); // Remove this in 6.3 $grid-column-responsive-gutter: null !default; @if $grid-column-responsive-gutter { - // scss-lint:disable DebugStatement @warn 'Rename $grid-column-responsive-gutter to $grid-column-gutter to remove this warning.'; $grid-column-gutter: $grid-column-responsive-gutter; } diff --git a/scss/typography/_print.scss b/scss/typography/_print.scss index 9518f3e20..2de0fa9aa 100644 --- a/scss/typography/_print.scss +++ b/scss/typography/_print.scss @@ -8,7 +8,7 @@ $print-transparent-backgrounds: true !default; $print-hrefs: true !default; -// scss-lint:disable all +// sass-lint:disable-all @mixin foundation-print-styles { .show-for-print { display: none !important; } diff --git a/scss/typography/_typography.scss b/scss/typography/_typography.scss index d17c16ab8..c794126ad 100644 --- a/scss/typography/_typography.scss +++ b/scss/typography/_typography.scss @@ -6,8 +6,6 @@ /// @group typography //// -// scss-lint:disable DeclarationOrder - // Base typography styles (tags only) @import 'base'; diff --git a/scss/util/_breakpoint.scss b/scss/util/_breakpoint.scss index 8d93b5e61..50f6f22b9 100644 --- a/scss/util/_breakpoint.scss +++ b/scss/util/_breakpoint.scss @@ -6,8 +6,6 @@ /// @group breakpoints //// -// scss-lint:disable ZeroUnit - /// A list of named breakpoints. You can use these with the `breakpoint()` mixin to quickly create media queries. /// @type Map $breakpoints: ( diff --git a/scss/util/_unit.scss b/scss/util/_unit.scss index d7129dbf3..c8cc6be52 100644 --- a/scss/util/_unit.scss +++ b/scss/util/_unit.scss @@ -8,8 +8,6 @@ $global-font-size: 100% !default; -// scss-lint:disable ZeroUnit - /// Removes the unit (e.g. px, em, rem) from a value, returning the number only. /// /// @param {Number} $num - Number to strip unit from.