]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Lint Sass codebase
authorGeoff Kimball <geoff@zurb.com>
Fri, 18 Dec 2015 22:00:04 +0000 (14:00 -0800)
committerGeoff Kimball <geoff@zurb.com>
Fri, 18 Dec 2015 22:00:04 +0000 (14:00 -0800)
16 files changed:
scss/_global.scss
scss/components/_callout.scss
scss/components/_dropdown-menu.scss
scss/components/_off-canvas.scss
scss/components/_orbit.scss
scss/components/_reveal.scss
scss/components/_sticky.scss
scss/components/_table.scss
scss/components/_tabs.scss
scss/components/_top-bar.scss
scss/forms/_input-group.scss
scss/forms/_text.scss
scss/grid/_column.scss
scss/typography/_alignment.scss
scss/typography/_base.scss
scss/util/_mixins.scss

index 34053d175da80682e12b8eefe6a185261e399138..e79b8e1c499f69f649c4abce9a8045db98682deb 100644 (file)
@@ -2,6 +2,8 @@
 // foundation.zurb.com
 // Licensed under MIT Open Source
 
+// scss-lint:disable ColorVariable, QualifyingElement, VendorPrefix
+
 ////
 /// @group global
 ////
index 62a2100b5b508467f5724d7aa8d9f5d9cb2fb95c..487343cad26cdbda6e03f00e92315db36dfd57a1 100644 (file)
@@ -95,7 +95,7 @@ $callout-link-tint: 30% !default;
     }
 
     &.small {
-      @include callout-size(.5rem);
+      @include callout-size(0.5rem);
     }
 
     &.large {
index 4a605016a6c7f30920e71c3beb00fc13c8e3e784..7cbdee062219c78211603ec81fa58708b9c0b8ba 100644 (file)
@@ -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);
       }
 
index bc388f358badea60deedef6faf4fbc6e385f0f59..bc379684024a74ebc521e32a320e20f3d23765f8 100644 (file)
@@ -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);
         }
index 1b763fb1b068da48fcf83a8396b187cabb606cb1..44f5ac6c06e59a9d740b0e7fb3141b54fabd05e3 100644 (file)
@@ -67,6 +67,7 @@ $orbit-control-zindex: 10 !default;
 @mixin orbit-slide {
   width: 100%;
   max-height: 100%;
+  
   &.no-motionui {
     &.is-active {
       top: 0;
index 57067ea291292ea63f5f005c7416153c84c5cc18..703560fe5760acaf514fb031e18c706e0efd30ee 100644 (file)
@@ -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;
index 113e001177836a614051857d691528a1d256019c..0273603c1a0dece7107283215f6901424e510791 100644 (file)
@@ -10,7 +10,7 @@
   .sticky {
     position: absolute;
     z-index: 0;
-    transform: translate3d(0,0,0);
+    transform: translate3d(0, 0, 0);
   }
 
   .sticky.is-stuck {
index 79d43eef92eecbea11122e66f93c519514aacb7c..d30ed09b903031e5c09bc381d636685bb86e544f 100644 (file)
@@ -170,7 +170,8 @@ $show-header-for-stacked: false !default;
         display: none;
       }
     }
-  } @else {
+  }
+  @else {
     thead {
       display: none;
     }
index 6eec814fa1fdb31f25b850f8dbc0c4320ae81d08..3227d605398004132bdaffaa13f091e283a92b22 100644 (file)
@@ -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;
   }
 }
index 2ef91bf6362876cc4ad39b8fedad5b00b3b5f5a6..690a9af830c3f95b617d5a501620a5c7fbb627dd 100644 (file)
@@ -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;
   }
index f8971ee2df33069a0f75b0d48e3e4a898d9fefb7..dafaf8f32b54aaf4124572d26d6ddafc1b9acb82 100644 (file)
@@ -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;
       }
     }
index 8c74b6a8ab4312fa99db922552f3f93dbabe2803..49bcf66fb9bb5b34762e9418ea83f48b5c017384 100644 (file)
@@ -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;
   }
index 68fea04b6f9ac3009aa562e09556ebf5ddcee8c1..fa517bdce10730b9c2942f6e04da99e6cd3803ba 100644 (file)
@@ -79,7 +79,7 @@
 ) {
   @include grid-row;
   @include grid-column($gutter: $gutter);
-  
+
   &,
   &:last-child {
     float: none;
index e4e6fe0cb38c800880004e57bd81e1aa4b759dd7..cfd3e99c7f1ca62a9e3425255279dcc137ba3f3f 100644 (file)
@@ -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;
           }
         }
       }
     }
+  }
 }
index f529bc8dff7ffea26bb2607526d96125053b452c..96f4ac61caeffc5ef9b8b349b80391a2e3f56cce 100644 (file)
@@ -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);
+        }
       }
     }
   }
index bd13a51030c38d15af6e4ed0fd74180ed54d9c77..6bc6841fdb756f0b58de221e3a21294273521ebf 100644 (file)
@@ -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,