diff options
author | JohnAlbin <virtually.johnalbin@gmail.com> | 2016-10-22 10:07:44 +0300 |
---|---|---|
committer | JohnAlbin <virtually.johnalbin@gmail.com> | 2016-10-22 10:07:44 +0300 |
commit | fd058831047946fa1f298504cce150894e0d60b0 (patch) | |
tree | 09958e21bb0cf32151f59e09ec104560156aceb4 | |
parent | a323041dbbba3c183de5945bc97bd7d6fc25306b (diff) |
Simplify @if statements. Clean-up from #89.
-rw-r--r-- | fork-versions/default/_normalize.scss | 36 | ||||
-rw-r--r-- | fork-versions/deprecated-compass/_normalize.scss | 14 | ||||
-rw-r--r-- | sass/normalize/_normalize-mixin.scss | 36 | ||||
-rw-r--r-- | test/fixtures/variables/font/output.css | 4 | ||||
-rw-r--r-- | test/fixtures/variables/indent-amount/output.css | 4 |
5 files changed, 32 insertions, 62 deletions
diff --git a/fork-versions/default/_normalize.scss b/fork-versions/default/_normalize.scss index d138f0c..3ddda42 100644 --- a/fork-versions/default/_normalize.scss +++ b/fork-versions/default/_normalize.scss @@ -27,8 +27,6 @@ html { // Correct old browser bug that prevented accessible resizing of text // when root font-size is set with px or em. font-size: ($base-font-size / 16px) * 100%; - } - @if $normalize-vertical-rhythm { line-height: ($base-line-height / $base-font-size) * 1em; } font-family: $base-font-family; /* 1 */ @@ -200,41 +198,31 @@ h1 { @if $normalize-vertical-rhythm { h2 { @include normalize-font-size($h2-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h2-font-size); - } + @include normalize-line-height($h2-font-size); @include normalize-margin(1 0, $h2-font-size); } h3 { @include normalize-font-size($h3-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h3-font-size); - } + @include normalize-line-height($h3-font-size); @include normalize-margin(1 0, $h3-font-size); } h4 { @include normalize-font-size($h4-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h4-font-size); - } + @include normalize-line-height($h4-font-size); @include normalize-margin(1 0, $h4-font-size); } h5 { @include normalize-font-size($h5-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h5-font-size); - } + @include normalize-line-height($h5-font-size); @include normalize-margin(1 0, $h5-font-size); } h6 { @include normalize-font-size($h6-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h6-font-size); - } + @include normalize-line-height($h6-font-size); @include normalize-margin(1 0, $h6-font-size); } } @@ -315,17 +303,15 @@ svg:not(:root) { @include normalize-margin(1 0); } - @if $normalize-vertical-rhythm { - /** - * Turn off margins on nested lists. - */ + /** + * Turn off margins on nested lists. + */ + ol, + ul { ol, ul { - ol, - ul { - margin: 0; - } + margin: 0; } } diff --git a/fork-versions/deprecated-compass/_normalize.scss b/fork-versions/deprecated-compass/_normalize.scss index bb0195c..9f70e0b 100644 --- a/fork-versions/deprecated-compass/_normalize.scss +++ b/fork-versions/deprecated-compass/_normalize.scss @@ -316,17 +316,15 @@ svg:not(:root) { @include output-rhythm(margin, rhythm(1) 0); } - @if $normalize-vertical-rhythm { - /** - * Turn off margins on nested lists. - */ + /** + * Turn off margins on nested lists. + */ + ol, + ul { ol, ul { - ol, - ul { - margin: 0; - } + margin: 0; } } diff --git a/sass/normalize/_normalize-mixin.scss b/sass/normalize/_normalize-mixin.scss index 083f999..c23c199 100644 --- a/sass/normalize/_normalize-mixin.scss +++ b/sass/normalize/_normalize-mixin.scss @@ -57,8 +57,6 @@ // Correct old browser bug that prevented accessible resizing of text // when root font-size is set with px or em. font-size: ($base-font-size / 16px) * 100%; - } - @if $normalize-vertical-rhythm { line-height: ($base-line-height / $base-font-size) * 1em; } font-family: $base-font-family; /* 1 */ @@ -235,41 +233,31 @@ @if $normalize-vertical-rhythm { h2 { @include normalize-font-size($h2-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h2-font-size); - } + @include normalize-line-height($h2-font-size); @include normalize-margin(1 0, $h2-font-size); } h3 { @include normalize-font-size($h3-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h3-font-size); - } + @include normalize-line-height($h3-font-size); @include normalize-margin(1 0, $h3-font-size); } h4 { @include normalize-font-size($h4-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h4-font-size); - } + @include normalize-line-height($h4-font-size); @include normalize-margin(1 0, $h4-font-size); } h5 { @include normalize-font-size($h5-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h5-font-size); - } + @include normalize-line-height($h5-font-size); @include normalize-margin(1 0, $h5-font-size); } h6 { @include normalize-font-size($h6-font-size); - @if $normalize-vertical-rhythm { - @include normalize-line-height($h6-font-size); - } + @include normalize-line-height($h6-font-size); @include normalize-margin(1 0, $h6-font-size); } } @@ -354,17 +342,15 @@ @include normalize-margin(1 0); } - @if $normalize-vertical-rhythm { - /** - * Turn off margins on nested lists. - */ + /** + * Turn off margins on nested lists. + */ + ol, + ul { ol, ul { - ol, - ul { - margin: 0; - } + margin: 0; } } diff --git a/test/fixtures/variables/font/output.css b/test/fixtures/variables/font/output.css index 05b4c28..f3df41f 100644 --- a/test/fixtures/variables/font/output.css +++ b/test/fixtures/variables/font/output.css @@ -228,8 +228,8 @@ ul { margin: 1.5rem 0; } /** - * Turn off margins on nested lists. - */ + * Turn off margins on nested lists. + */ ol ol, ol ul, ul ol, diff --git a/test/fixtures/variables/indent-amount/output.css b/test/fixtures/variables/indent-amount/output.css index ef0fec4..2f67b2a 100644 --- a/test/fixtures/variables/indent-amount/output.css +++ b/test/fixtures/variables/indent-amount/output.css @@ -228,8 +228,8 @@ ul { margin: 1.5em 0; } /** - * Turn off margins on nested lists. - */ + * Turn off margins on nested lists. + */ ol ol, ol ul, ul ol, |