]> git.ipfire.org Git - thirdparty/foundation/foundation-emails.git/commitdiff
added that yaml brah, linted some of that scss dude
authorTim Hartwick <tdhartwick2@gmail.com>
Mon, 24 Aug 2015 21:28:48 +0000 (14:28 -0700)
committerTim Hartwick <tdhartwick2@gmail.com>
Mon, 24 Aug 2015 21:28:48 +0000 (14:28 -0700)
config/scss-lint.yml [new file with mode: 0644]
gulpfile.js
package.json
scss/ink.scss
scss/ink/components/_alignment.scss
scss/ink/components/_block-grid.scss
scss/ink/components/_button.scss
scss/ink/components/_visibility.scss [new file with mode: 0644]

diff --git a/config/scss-lint.yml b/config/scss-lint.yml
new file mode 100644 (file)
index 0000000..2e4056b
--- /dev/null
@@ -0,0 +1,189 @@
+# Default application configuration that all configurations inherit from.
+
+scss_files: "scss/**/*.scss"
+
+linters:
+  BangFormat:
+    enabled: true
+    space_before_bang: true
+    space_after_bang: false
+
+  BorderZero:
+    enabled: true
+    convention: zero # or `none`
+
+  ColorKeyword:
+    enabled: true
+
+  ColorVariable:
+    enabled: true
+
+  Comment:
+    enabled: false
+
+  DebugStatement:
+    enabled: true
+
+  DeclarationOrder:
+    enabled: true
+
+  DuplicateProperty:
+    enabled: true
+
+  ElsePlacement:
+    enabled: true
+    style: new_line # or 'same_line'
+
+  EmptyLineBetweenBlocks:
+    enabled: true
+    ignore_single_line_blocks: true
+
+  EmptyRule:
+    enabled: true
+
+  FinalNewline:
+    enabled: true
+    present: true
+
+  HexLength:
+    enabled: true
+    style: short # or 'long'
+
+  HexNotation:
+    enabled: true
+    style: lowercase # or 'uppercase'
+
+  HexValidation:
+    enabled: true
+
+  IdSelector:
+    enabled: true
+
+  ImportantRule:
+    enabled: false
+
+  ImportPath:
+    enabled: true
+    leading_underscore: false
+    filename_extension: false
+
+  Indentation:
+    enabled: true
+    allow_non_nested_indentation: false
+    character: space # or 'tab'
+    width: 2
+
+  LeadingZero:
+    enabled: true
+    style: include_zero # or 'include_zero'
+
+  MergeableSelector:
+    enabled: true
+    force_nesting: true
+
+  NameFormat:
+    enabled: true
+    allow_leading_underscore: true
+    convention: hyphenated_lowercase # or 'BEM', or a regex pattern
+
+  NestingDepth:
+    enabled: true
+    max_depth: 3
+
+  PlaceholderInExtend:
+    enabled: true
+
+  PropertyCount:
+    enabled: false
+    include_nested: false
+    max_properties: 10
+
+  PropertySortOrder:
+    enabled: false
+    ignore_unspecified: false
+    separate_groups: false
+
+  PropertySpelling:
+    enabled: true
+    extra_properties: []
+
+  QualifyingElement:
+    enabled: false
+    allow_element_with_attribute: false
+    allow_element_with_class: false
+    allow_element_with_id: false
+
+  SelectorDepth:
+    enabled: true
+    max_depth: 3
+
+  SelectorFormat:
+    enabled: true
+    convention: '([a-z0-9]+-?)+'
+
+  Shorthand:
+    enabled: true
+
+  SingleLinePerProperty:
+    enabled: true
+    allow_single_line_rule_sets: false
+
+  SingleLinePerSelector:
+    enabled: false
+
+  SpaceAfterComma:
+    enabled: true
+
+  SpaceAfterPropertyColon:
+    enabled: true
+    style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
+
+  SpaceAfterPropertyName:
+    enabled: true
+
+  SpaceBeforeBrace:
+    enabled: true
+    style: space # or 'new_line'
+    allow_single_line_padding: true
+
+  SpaceBetweenParens:
+    enabled: true
+    spaces: 0
+
+  StringQuotes:
+    enabled: true
+    style: single_quotes # or double_quotes
+
+  TrailingSemicolon:
+    enabled: true
+
+  TrailingZero:
+    enabled: false
+
+  UnnecessaryMantissa:
+    enabled: true
+
+  UnnecessaryParentReference:
+    enabled: true
+
+  UrlFormat:
+    enabled: true
+
+  UrlQuotes:
+    enabled: true
+
+  VariableForProperty:
+    enabled: false
+    properties: []
+
+  VendorPrefixes:
+    enabled: true
+    identifier_list: base
+    include: []
+    exclude: []
+
+  ZeroUnit:
+    enabled: true
+
+  Compass::*:
+    enabled: false
\ No newline at end of file
index 5576335671101d5c40a0d4ce59340b47a7870833..6b121185c78f9fc7ba24ab8e5b0b2ac58fbe81b3 100644 (file)
@@ -22,6 +22,7 @@ var gulp       = require('gulp'),
     map        = require('vinyl-map'),
     fs         = require('fs'),
     rimraf     = require('rimraf'),
+    scssLint = require('gulp-scss-lint'),
     // HTML stuff
     minifyHTML = require('gulp-minify-html'),
     inkyGulp   = require('gulp-inky'),
@@ -163,6 +164,15 @@ gulp.task('inky-parse', function() {
 
 // });
 
+// Lints Sass files for formatting issues
+gulp.task('lint', ['lint:sass']);
+gulp.task('lint:sass', function() {
+  return gulp.src('scss/**/*.scss')
+    .pipe(scssLint({
+      'config': 'config/scss-lint.yml'
+    }));
+});
+
 // 7. Utility Tasks
 // - - - - - - - - - - - - - - -
 
index ca8d3546652df2fc8cbed861e23e470e66e5c297..d1b073d13ab7da61d11ea075a2ddd491b65705c6 100644 (file)
@@ -14,6 +14,7 @@
     "gulp-minify-html": "^0.1.8",
     "gulp-rename": "^1.2.0",
     "gulp-ruby-sass": "^0.7.1",
+    "gulp-scss-lint": "^0.2.4",
     "handlebars": "^3.0.0",
     "media-query-extractor": "^0.1.1",
     "path": "^0.11.14",
index e22e65239a88a4f39df702bdbbeeb6e4a714ef0d..3bbf50f62443fcc800adf6c87af258c38f810831 100755 (executable)
@@ -1,17 +1,18 @@
-/**********************************************
-* Ink v1.0.5 - Copyright 2013 ZURB Inc        *
-**********************************************/
+// Foundation by ZURB
+// foundation.zurb.com
+// Licensed under MIT Open Source
+
+$foundation-version: '1.0.0-alpha';
        
-// Make sure the charset is set appropriately
 @charset "UTF-8";
 
-// Behold, here are all the Ink components.
 @import
        "ink/settings",
        "ink/components/normalize",
        "ink/components/grid",
        "ink/components/block-grid",
        "ink/components/alignment",
+  "ink/components/visibility",
        "ink/components/type",
   "ink/components/button",
   "ink/components/callout",
index af8a6dfa0523455d244e94208dbc96e4fcaf627c..a354ef689eb86b599a64e8df9b9cb60e729f2f3b 100755 (executable)
@@ -2,45 +2,29 @@
 // zurb.com/ink/
 // Licensed under MIT Open Source
 
-@import "global";
-
-//
-// @variables
-//
-$include-html-alignment-classes: $include-html-classes !default;
-
-@include exports("alignment") {
-       @if $include-html-alignment-classes {
-               /* Alignment & Visibility Classes */
-
-               table.center, td.center {
-                 text-align: center;
-               }
-
-               h1.center,
-               h2.center,
-               h3.center,
-               h4.center,
-               h5.center,
-               h6.center,
-               p.center {
-                 text-align: center;
-               }
-
-               span.center {
-                 display: block;
-                 width: 100%;
-                 text-align: center;
-               }
-
-               img.center {
-                 margin: 0 auto;
-                 float: none;
-               }
-
-               .show-for-small,
-               .hide-for-desktop {
-                 display: none;
-               }
-       }
-}      
\ No newline at end of file
+////
+/// @group alignment
+////
+
+table.center,
+td.center,
+h1.center,
+h2.center,
+h3.center,
+h4.center,
+h5.center,
+h6.center,
+p.center,
+span.center {
+  text-align: center;
+}
+
+span.center {
+  display: block;
+  width: 100%;
+}
+
+img.center {
+  margin: 0 auto;
+  float: none;
+}
index 15215e15280d609986b3e148cbe4d7b68c21d54f..6cca54ab2696c86da871e6f905bb6c64b395719a 100755 (executable)
@@ -4,49 +4,35 @@
 
 @import "global";
 
-//
-// @variables
-//
-$include-html-grid-classes: $include-html-classes !default;
-$include-html-block-grid-classes: $include-html-grid-classes !default;
+////
+/// @group block-grid
+////
 
-// We use this to control the maximum number of block grid elements per row
+///Defualt number of elements in the block grid per row.
+///@type Number
 $block-grid-elements: 8 !default;
-$block-grid-default-spacing: $column-gutter !default;
 
-$align-block-grid-to-grid: false !default;
-@if $align-block-grid-to-grid {
-  $block-grid-default-spacing: $column-gutter;
-}
-
-//
-// Block Grid Mixins
-//
+///Defualt gutter between elements in the block grid.
+///@type Number
+$block-grid-spacing: $column-gutter !default;
 
-// Generate markup for block grid.
-//
-@mixin block-grid-html-classes() {
+///Creates all of the block-grid classes.
+@mixin block-grid {
   @for $i from 2 through $block-grid-elements {
-    .block-grid-#{$i} td {
-      width: floor(($container-width - $i * $block-grid-default-spacing) / $i) !important;
+    .up-#{$i} td {
+      width: floor(($container-width - $i * $block-grid-spacing) / $i) !important;
     }
   }
 }
 
-@include exports("block-grid") {
-  @if $include-html-block-grid-classes {  
-    /* Block Grid */
-
-    .block-grid {
-      width: 100%;
-      max-width: $container-width;
-    }
-
-    .block-grid td {
-      display: inline-block;
-      padding: $block-grid-default-spacing / 2;
-    }
+.block-grid {
+  width: 100%;
+  max-width: $container-width;
 
-    @include block-grid-html-classes();
+  td {
+    display: inline-block;
+    padding: $block-grid-spacing / 2;
   }
-}
\ No newline at end of file
+}
+
+@include block-grid();
index bd08ed4ef66ea5b6145d7c5c08d7c6d4a9b2e2b3..7686c4267fa8444717eccf7511046e2ea950219b 100755 (executable)
@@ -4,9 +4,10 @@
 
 @import "global";
 
-//
-// @variables
-//
+////
+/// @group button
+////
+
 $include-html-button-classes: $include-html-classes !default;
 
 // We use these to build padding for buttons.
diff --git a/scss/ink/components/_visibility.scss b/scss/ink/components/_visibility.scss
new file mode 100644 (file)
index 0000000..d5e3e02
--- /dev/null
@@ -0,0 +1,12 @@
+// Ink by ZURB
+// zurb.com/ink/
+// Licensed under MIT Open Source
+
+////
+/// @group visibility
+////
+
+.show-for-small,
+.hide-for-desktop {
+  display: none;
+}