From: Geoff Kimball Date: Fri, 18 Dec 2015 22:00:04 +0000 (-0800) Subject: Lint Sass codebase X-Git-Tag: v6.1.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2cc4baaaeb4bb7bd820776afec0f48b7ecba259;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Lint Sass codebase --- diff --git a/scss/_global.scss b/scss/_global.scss index 34053d175..e79b8e1c4 100644 --- a/scss/_global.scss +++ b/scss/_global.scss @@ -2,6 +2,8 @@ // foundation.zurb.com // Licensed under MIT Open Source +// scss-lint:disable ColorVariable, QualifyingElement, VendorPrefix + //// /// @group global //// diff --git a/scss/components/_callout.scss b/scss/components/_callout.scss index 62a2100b5..487343cad 100644 --- a/scss/components/_callout.scss +++ b/scss/components/_callout.scss @@ -95,7 +95,7 @@ $callout-link-tint: 30% !default; } &.small { - @include callout-size(.5rem); + @include callout-size(0.5rem); } &.large { diff --git a/scss/components/_dropdown-menu.scss b/scss/components/_dropdown-menu.scss index 4a605016a..7cbdee062 100644 --- a/scss/components/_dropdown-menu.scss +++ b/scss/components/_dropdown-menu.scss @@ -50,18 +50,21 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1); padding-#{$global-right}: 1.5rem; position: relative; } + &.is-down-arrow > a::after { @include css-triangle(5px, $dropdownmenu-arrow-color, down); position: absolute; top: rem-calc(2px) + rem-calc(get-side($menu-item-padding, top)); #{$global-right}: 5px; } + &.is-left-arrow > a::after { @include css-triangle(5px, $dropdownmenu-arrow-color, left); float: left; margin-left: 0; margin-right: 10px; } + &.is-right-arrow > a::after { @include css-triangle(5px, $dropdownmenu-arrow-color, right); } @@ -71,10 +74,12 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1); right: 0; left: auto; } + &.is-right-arrow.opens-inner .submenu { left: 0; right: auto; } + &.opens-inner .submenu { top: 100%; } @@ -94,7 +99,7 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1); background: $dropdownmenu-background; border: $dropdownmenu-border; - @if (type_of($dropdownmenu-border-width) == 'number') { + @if (type-of($dropdownmenu-border-width) == 'number') { margin-top: (-$dropdownmenu-border-width); } diff --git a/scss/components/_off-canvas.scss b/scss/components/_off-canvas.scss index bc388f358..bc3796840 100644 --- a/scss/components/_off-canvas.scss +++ b/scss/components/_off-canvas.scss @@ -103,7 +103,7 @@ $maincontent-shadow: 0 0 10px rgba($black, 0.5) !default; z-index: $offcanvas-zindex; max-height: 100%; overflow-y: auto; - transform: translateX(0px); + transform: translateX(0); } @mixin off-canvas-position( @@ -170,6 +170,7 @@ $maincontent-shadow: 0 0 10px rgba($black, 0.5) !default; .position-left.reveal-for-#{$name} { @include off-canvas-reveal(left); } + .position-right.reveal-for-#{$name} { @include off-canvas-reveal(right); } diff --git a/scss/components/_orbit.scss b/scss/components/_orbit.scss index 1b763fb1b..44f5ac6c0 100644 --- a/scss/components/_orbit.scss +++ b/scss/components/_orbit.scss @@ -67,6 +67,7 @@ $orbit-control-zindex: 10 !default; @mixin orbit-slide { width: 100%; max-height: 100%; + &.no-motionui { &.is-active { top: 0; diff --git a/scss/components/_reveal.scss b/scss/components/_reveal.scss index 57067ea29..703560fe5 100644 --- a/scss/components/_reveal.scss +++ b/scss/components/_reveal.scss @@ -63,8 +63,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default; z-index: $reveal-zindex + 1; padding: $reveal-padding; border: $reveal-border; - // margin: 100px auto 0 100px; - margin: 100px auto 0 auto; + margin: 100px auto 0; background-color: $reveal-background; border-radius: $reveal-radius; @@ -109,14 +108,14 @@ $reveal-overlay-background: rgba($black, 0.45) !default; min-height: 100vh; max-width: none; margin-left: 0; - border: none; + border: 0; } @mixin foundation-reveal { body.is-reveal-open { overflow: hidden; } - + // Overlay .reveal-overlay { @include reveal-overlay; @@ -128,6 +127,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default; @include reveal-modal-width($reveal-width); position: absolute; overflow-y: auto; + // Remove padding &.collapse { padding: 0; diff --git a/scss/components/_sticky.scss b/scss/components/_sticky.scss index 113e00117..0273603c1 100644 --- a/scss/components/_sticky.scss +++ b/scss/components/_sticky.scss @@ -10,7 +10,7 @@ .sticky { position: absolute; z-index: 0; - transform: translate3d(0,0,0); + transform: translate3d(0, 0, 0); } .sticky.is-stuck { diff --git a/scss/components/_table.scss b/scss/components/_table.scss index 79d43eef9..d30ed09b9 100644 --- a/scss/components/_table.scss +++ b/scss/components/_table.scss @@ -170,7 +170,8 @@ $show-header-for-stacked: false !default; display: none; } } - } @else { + } + @else { thead { display: none; } diff --git a/scss/components/_tabs.scss b/scss/components/_tabs.scss index 6eec814fa..3227d6053 100644 --- a/scss/components/_tabs.scss +++ b/scss/components/_tabs.scss @@ -85,7 +85,7 @@ $tab-content-padding: 1rem !default; &:hover { background: $tab-item-background-hover; } - + &:focus, &[aria-selected='true'] { background: $tab-background-active; @@ -124,7 +124,7 @@ $tab-content-padding: 1rem !default; // Vertical .tabs.vertical { - @include tabs-container-vertical; + @include tabs-container-vertical; } // Simple @@ -165,6 +165,6 @@ $tab-content-padding: 1rem !default; } .tabs-panel { - @include tabs-panel; + @include tabs-panel; } } diff --git a/scss/components/_top-bar.scss b/scss/components/_top-bar.scss index 2ef91bf63..690a9af83 100644 --- a/scss/components/_top-bar.scss +++ b/scss/components/_top-bar.scss @@ -42,16 +42,17 @@ $topbar-input-width: 200px !default; } input.button { - width:auto; + width: auto; } } /// makes sections stacked -@mixin top-bar-stacked() { +@mixin top-bar-stacked { // Sub-sections .top-bar-right { width: 100%; } + .top-bar-left { width: 100%; } @@ -62,7 +63,8 @@ $topbar-input-width: 200px !default; .top-bar { @include top-bar-container; } - // generate classes for stacking on each screen size (defined in $breakpoint-classes) + + // Generate classes for stacking on each screen size (defined in $breakpoint-classes) @each $size in $breakpoint-classes { .stacked-for-#{$size} { @include breakpoint($size down) { @@ -70,7 +72,8 @@ $topbar-input-width: 200px !default; } } } - // stack on small screens as default + + // Stack on small screens as default @include breakpoint(small down) { @include top-bar-stacked; } @@ -79,6 +82,7 @@ $topbar-input-width: 200px !default; .top-bar-left { float: left; } + .top-bar-right { float: right; } diff --git a/scss/forms/_input-group.scss b/scss/forms/_input-group.scss index f8971ee2d..dafaf8f32 100644 --- a/scss/forms/_input-group.scss +++ b/scss/forms/_input-group.scss @@ -30,12 +30,12 @@ $input-prefix-padding: 1rem !default; width: 100%; margin-bottom: $form-spacing; - & > *:first-child { + > :first-child { border-radius: $global-radius 0 0 $global-radius; } - & > *:last-child { - & > * { + > :last-child { + > * { border-radius: 0 $global-radius $global-radius 0; } } diff --git a/scss/forms/_text.scss b/scss/forms/_text.scss index 8c74b6a8a..49bcf66fb 100644 --- a/scss/forms/_text.scss +++ b/scss/forms/_text.scss @@ -134,6 +134,7 @@ $input-radius: $global-radius !default; } // Reset Normalize setting content-box to search elements + // scss-lint:disable QualifyingElement input[type='search'] { box-sizing: border-box; } diff --git a/scss/grid/_column.scss b/scss/grid/_column.scss index 68fea04b6..fa517bdce 100644 --- a/scss/grid/_column.scss +++ b/scss/grid/_column.scss @@ -79,7 +79,7 @@ ) { @include grid-row; @include grid-column($gutter: $gutter); - + &, &:last-child { float: none; diff --git a/scss/typography/_alignment.scss b/scss/typography/_alignment.scss index e4e6fe0cb..cfd3e99c7 100644 --- a/scss/typography/_alignment.scss +++ b/scss/typography/_alignment.scss @@ -3,20 +3,20 @@ // Licensed under MIT Open Source @mixin foundation-text-alignment { - @each $size in $breakpoint-classes { - @include breakpoint($size) { - @each $align in (left, right, center, justify) { - @if $size != 'small' { - .#{$size}-text-#{$align} { - text-align: $align; - } + @each $size in $breakpoint-classes { + @include breakpoint($size) { + @each $align in (left, right, center, justify) { + @if $size != 'small' { + .#{$size}-text-#{$align} { + text-align: $align; } - @else { - .text-#{$align} { - text-align: $align; - } + } + @else { + .text-#{$align} { + text-align: $align; } } } } + } } diff --git a/scss/typography/_base.scss b/scss/typography/_base.scss index f529bc8df..96f4ac61c 100644 --- a/scss/typography/_base.scss +++ b/scss/typography/_base.scss @@ -306,7 +306,9 @@ $abbr-underline: 1px dotted $black !default; @each $size, $headers in $header-sizes { @include breakpoint($size) { @each $header, $font-size in $headers { - #{$header} { font-size: rem-calc($font-size); } + #{$header} { + font-size: rem-calc($font-size); + } } } } diff --git a/scss/util/_mixins.scss b/scss/util/_mixins.scss index bd13a5103..6bc6841fd 100644 --- a/scss/util/_mixins.scss +++ b/scss/util/_mixins.scss @@ -49,7 +49,7 @@ /// @param {Number} $weight - Height of individual bars in the icon. /// @param {Number} $bars - Number of bars in the icon. @mixin hamburger( - $color: black, + $color: #000, $color-hover: #666, $width: 20px, $height: 16px,