From: Nicolas Coden Date: Tue, 15 Nov 2016 17:37:40 +0000 (+0100) Subject: Sass lint: use "stroustrup" as brace style convention X-Git-Tag: v6.3-rc1~2^2~5^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da7ad06641e63148b7c6d85bc6f175d0d868a0ea;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Sass lint: use "stroustrup" as brace style convention Sass lint: use "stroustrup" instead of "1TBS" as brace style convention. See: https://en.wikipedia.org/wiki/Indent_style Pros: - Easily add or remove lines within a `@if`/`@else if`/`@else` block, without having to rearrange the braces. - Able to add comments that describe a condition (`@if (...)`, `@else if (...)` or `@else`) or the whole conditional block. - Clearly separate the different parts of the conditional block. Cons: - Not commonly used --- diff --git a/.sass-lint.yml b/.sass-lint.yml index 7a1ff5d52..af8d97d34 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -21,7 +21,8 @@ rules: brace-style: - 1 - - allow-single-line: false + - style: stroustrup + - allow-single-line: true class-name-format: - 1 diff --git a/scss/components/_dropdown-menu.scss b/scss/components/_dropdown-menu.scss index 1961df7cb..a9b824223 100644 --- a/scss/components/_dropdown-menu.scss +++ b/scss/components/_dropdown-menu.scss @@ -169,7 +169,8 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1); top: 100%; @if $global-text-direction == 'rtl' { right: auto; - } @else { + } + @else { left: auto; } } diff --git a/scss/grid/_gutter.scss b/scss/grid/_gutter.scss index 5ddc6a405..8408b6109 100644 --- a/scss/grid/_gutter.scss +++ b/scss/grid/_gutter.scss @@ -42,7 +42,8 @@ @include grid-column-gutter($value); } } - } @else { + } + @else { // breakpoint name @if type-of($gutter) == 'string' { $gutter: grid-column-gutter($gutter, $gutters); diff --git a/scss/util/_color.scss b/scss/util/_color.scss index c9f2e4a82..ae23683b1 100644 --- a/scss/util/_color.scss +++ b/scss/util/_color.scss @@ -48,7 +48,8 @@ @function get-color($key) { @if map-has-key($foundation-palette, $key) { @return map-get($foundation-palette, $key); - } @else { + } + @else { @error 'given $key is not available in $foundation-palette'; } } diff --git a/scss/util/_value.scss b/scss/util/_value.scss index df0e9b150..cec4408be 100644 --- a/scss/util/_value.scss +++ b/scss/util/_value.scss @@ -126,9 +126,11 @@ @if $keep == 'keys' { @return $keys; - } @else if $keep == 'values' { + } + @else if $keep == 'values' { @return $values; - } @else { + } + @else { @return zip($keys, $values); } }