]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Lint Sass
authorGeoff Kimball <geoff@zurb.com>
Sat, 16 Jan 2016 01:27:39 +0000 (17:27 -0800)
committerGeoff Kimball <geoff@zurb.com>
Sat, 16 Jan 2016 01:27:39 +0000 (17:27 -0800)
13 files changed:
scss/components/_dropdown-menu.scss
scss/components/_orbit.scss
scss/components/_pagination.scss
scss/components/_reveal.scss
scss/components/_slider.scss
scss/components/_top-bar.scss
scss/forms/_forms.scss
scss/grid/_classes.scss
scss/grid/_column.scss
scss/grid/_flex-grid.scss
scss/grid/_row.scss
scss/util/_mixins.scss
scss/util/_unit.scss

index 64917dfb90c1f800bc98b4a64a38574dd4fc1a65..8e3f11e8a19ab7fab3c72955fc7eb7207dcb8f66 100644 (file)
@@ -36,6 +36,7 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
     a {
       @include disable-mouse-outline;
     }
+
     .is-dropdown-submenu-parent {
       position: relative;
 
@@ -79,10 +80,15 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
         left: 0;
         right: auto;
       }
-      
+
       &.opens-inner .submenu {
         top: 100%;
       }
+
+      &.opens-left .submenu {
+        left: auto;
+        right: 100%;
+      }
     }
 
     .no-js & ul {
@@ -100,7 +106,7 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
       border: $dropdownmenu-border;
 
       @if (type-of($dropdownmenu-border-width) == 'number') {
-        .submenu {
+        .submenu {
           margin-top: (-$dropdownmenu-border-width);
         }
       }
@@ -115,17 +121,14 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
         right: auto;
       }
 
+      // [TODO] Cut back specificity
+      // scss-lint:disable SelectorDepth
       &:not(.js-dropdown-nohover) > .is-dropdown-submenu-parent:hover > &,
       &.js-dropdown-active {
         display: block;
       }
     }
 
-    .is-dropdown-submenu-parent.opens-left .submenu {
-      left: auto;
-      right: 100%;
-    }
-
     &.align-right {
       .submenu.first-sub {
         top: 100%;
index 44f5ac6c06e59a9d740b0e7fb3141b54fabd05e3..357c154c52ef28dad089431a472154e87d8ef6d3 100644 (file)
@@ -67,7 +67,7 @@ $orbit-control-zindex: 10 !default;
 @mixin orbit-slide {
   width: 100%;
   max-height: 100%;
-  
+
   &.no-motionui {
     &.is-active {
       top: 0;
index 0fe8c9c7e5caca9af84f7f7e7987e6d246fa7373..961cc0a86bb5eed4b69048ecdcb099502a773276 100644 (file)
@@ -75,7 +75,7 @@ $pagination-arrows: true !default;
     }
     @else {
       display: none;
-      
+
       &:last-child,
       &:first-child {
         display: inline-block;
index bd86dccaecff73d6b69db43d4a7ee5e5b92a715c..ffa382234c248afb120b94d9699af6cc76368574 100644 (file)
@@ -112,6 +112,8 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
 }
 
 @mixin foundation-reveal {
+  // [TODO] Is this necessary?
+  // scss-lint:disable QualifyingElement
   body.is-reveal-open {
     overflow: hidden;
   }
@@ -128,11 +130,6 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
     position: absolute;
     overflow-y: auto;
 
-    // Remove padding
-    &.collapse {
-      padding: 0;
-    }
-
     // Placeholder selector for medium-and-up modals
     // Prevents duplicate CSS when defining multiple Reveal sizes
     @include breakpoint(medium) {
@@ -143,6 +140,11 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
       }
     }
 
+    // Remove padding
+    &.collapse {
+      padding: 0;
+    }
+
     // Sizing classes
     &.tiny  { @include reveal-modal-width(30%); }
     &.small { @include reveal-modal-width(50%); }
index ba34a05a3f2a289b79406051989d2b3ef61aaa42..6431f42a92a8037d307ba0db0676a70306d1e294 100644 (file)
@@ -157,7 +157,9 @@ $slider-transition: all 0.2s ease-in-out !default;
   }
 
   // RTL support
-  html[dir="rtl"] .slider:not(.vertical){
-    transform: scale(-1, 1);
+  @if $global-text-direction == rtl {
+    .slider:not(.vertical) {
+      transform: scale(-1, 1);
+    }
   }
 }
index 257bb8848e8417b4b873c68356b031c1f509ec14..da799bd89aef7c94075935fc2a74b54af520f4da 100644 (file)
@@ -33,6 +33,7 @@ $topbar-input-width: 200px !default;
     margin-#{$global-right}: 1rem;
   }
 
+  // scss-lint:disable QualifyingElement
   input.button {
     width: auto;
   }
@@ -74,7 +75,7 @@ $topbar-input-width: 200px !default;
   .top-bar-left {
     float: left;
   }
-  
+
   .top-bar-right {
     float: right;
   }
index 0d9aa9706be6635767590e2b31dfaec075e8edf4..ddad21b5862f23ba151317c165161fde3a444b95 100644 (file)
 /// @type Number
 $form-spacing: rem-calc(16) !default;
 
-@import
-  'text',
-  'checkbox',
-  'label',
-  'help-text',
-  'input-group',
-  'fieldset',
-  'select',
-  'error';
+@import 'text';
+@import 'checkbox';
+@import 'label';
+@import 'help-text';
+@import 'input-group';
+@import 'fieldset';
+@import 'select';
+@import 'error';
 
 @mixin foundation-forms {
   @include foundation-form-text;
index 4efd3dbb4b2111f76f0f881a17c63febed5c9a36..384149550cca110753df19e12216134b792abe35 100644 (file)
 
     .#{$-zf-size}-#{$uncollapse} {
       $gutter: null;
-      
+
       @if $grid-column-gutter {
         $gutter: $grid-column-gutter;
       }
index ed2638988d19b8d992eb8bf39d2d1cf74f9f8d53..29b5a813a0ed6907e3f078fecfe3b9c8be72fd76 100644 (file)
@@ -63,7 +63,7 @@
   @else {
     @each $breakpoint, $gutter in $grid-column-responsive-gutter {
       $padding: rem-calc($gutter) / 2;
-      
+
       @include breakpoint($breakpoint) {
         padding-left: $padding;
         padding-right: $padding;
index c8f06028620361ce7d141b3a93038ebe76ac7a35..7d5224e6f27ba6b6cc15dcb6a756aa866facf4fa 100644 (file)
@@ -71,6 +71,7 @@ $-zf-flex-align: (
 ///
 /// @param {Mixed} $columns [null] - Width of the column.
 @function flex-grid-column($columns: null) {
+  // scss-lint:disable ZeroUnit
   $flex: 1 1 0px;
 
   @if $columns == shrink {
@@ -97,7 +98,7 @@ $-zf-flex-align: (
   @else {
     @each $breakpoint, $gutter in $grid-column-responsive-gutter {
       $padding: rem-calc($gutter) / 2;
-      
+
       @include breakpoint($breakpoint) {
         padding-left: $padding;
         padding-right: $padding;
index 27cbfade81bb501590005e6f6829d1149df3ce18..a1791dcaf17574713b8d5ba64bd78e5e9e2f88d2 100644 (file)
@@ -88,6 +88,7 @@
   @else {
     @each $breakpoint, $value in $grid-column-responsive-gutter {
       $margin: rem-calc($value) / 2 * -1;
+
       @include breakpoint($breakpoint) {
         margin-left: $margin;
         margin-right: $margin;
index b2053fc5bcbd31c4f9565d543c1beb8a74420933..0e51e11951da9b5f0252c125bfec1e143db33ac8 100644 (file)
@@ -53,8 +53,8 @@
 /// @param {Number} $weight - Height of individual bars in the icon.
 /// @param {Number} $bars - Number of bars in the icon.
 @mixin hamburger(
-  $color: #000,
-  $color-hover: #666,
+  $color: $black,
+  $color-hover: $medium-gray,
   $width: 20px,
   $height: 16px,
   $weight: 2px,
index 2004a858d127dc4a15c5b0f3dba0c9dd14ee33f4..bb96c98cfa2e9a1d04d3db4211abb9f5120b5748 100644 (file)
@@ -75,7 +75,7 @@ $global-font-size: 100% !default;
     @warn inspect($value) + ' was passed to rem-calc(), which is not a number.';
     @return $value;
   }
-  
+
   // Calculate rem if units for $value is not rem
   @if unit($value) != 'rem' {
     $value: strip-unit($value) / strip-unit($base) * 1rem;