Skip to content

Commit

Permalink
Don't output vertical rhythm on h1 by default. #88
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Oct 24, 2016
1 parent 6dcf294 commit a3e5051
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
9 changes: 7 additions & 2 deletions fork-versions/default/_normalize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,13 @@ h1 {
@include normalize-line-height($h1-font-size);
}

/* Set 1 unit of vertical rhythm on the top and bottom margins. */
@include normalize-margin(1 0, $h1-font-size);
@if $normalize-vertical-rhythm {
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
@include normalize-margin(1 0, $h1-font-size);
}
@else {
margin: 0.67em 0;
}
}

@if $normalize-vertical-rhythm {
Expand Down
9 changes: 7 additions & 2 deletions sass/normalize/_normalize-mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@
@include normalize-line-height($h1-font-size);
}

/* Set 1 unit of vertical rhythm on the top and bottom margins. */
@include normalize-margin(1 0, $h1-font-size);
@if $normalize-vertical-rhythm {
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
@include normalize-margin(1 0, $h1-font-size);
}
@else {
margin: 0.67em 0;
}
}

@if $normalize-vertical-rhythm {
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/fork-versions/default/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }

/* Grouping content
========================================================================== */
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/import-now/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }

/* Grouping content
========================================================================== */
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/normalize/exclude-multiple/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }

/* Links
========================================================================== */
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/normalize/exclude-single/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }

/* Grouping content
========================================================================== */
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/normalize/exclude-string/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }

/* Grouping content
========================================================================== */
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/normalize/include-multiple/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }
3 changes: 1 addition & 2 deletions test/fixtures/variables/default/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }

/* Grouping content
========================================================================== */
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/variables/indent-amount/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ section {
*/
h1 {
font-size: 2em;
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
margin: 0.75em 0; }
margin: 0.67em 0; }

/* Grouping content
========================================================================== */
Expand Down

0 comments on commit a3e5051

Please sign in to comment.