Skip to content

Commit

Permalink
adds position argument to debug mixin (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrose authored Oct 10, 2020
1 parent c794810 commit bbc8e9c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions _typesettings.bundle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ $not-integer-txt: ' value breaks vertical rhythm. Use an integer (whole number)

// Creates base type baseline overlay and vertical unit overlay.
// To use on the body tag for example: body { @include debug-vertical-alignment(); } and add class va-debug to the body tag
@mixin debug-vertical-alignment($opacity: 0.8, $vertical-unit: $base-vertical-unit, $type-base-line-multi: $base-line-multi, $type-size: $base-em-font-size) {
@mixin debug-vertical-alignment($position: 'absolute', $opacity: 0.8, $vertical-unit: $base-vertical-unit, $type-base-line-multi: $base-line-multi, $type-size: $base-em-font-size) {
position: relative;

&::before,
&::after {
content: "";
position: absolute;
position: #{$position};
top: 0;
left: 0;
bottom: 0;
Expand Down
4 changes: 2 additions & 2 deletions _typesettings.bundle.styl
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ rhythmBorder($border-width= 1px, $lines= $base-line-multi, $font-size= $base-em-

// Creates base type baseline overlay and vertical unit overlay.
// To use on the body tag for example: body { debug-vertical-alignment(); } and add class va-debug to the body tag
debug-vertical-alignment($opacity= 0.8, $vertical-unit= $base-vertical-unit, $type-base-line-multi= $base-line-multi, $type-size= $base-em-font-size)
debug-vertical-alignment($position= absolute,$opacity= 0.8, $vertical-unit= $base-vertical-unit, $type-base-line-multi= $base-line-multi, $type-size= $base-em-font-size)
position: relative;

&::before,
&::after {
content: "";
position: absolute;
position: $position;
top: 0;
left: 0;
bottom: 0;
Expand Down
2 changes: 1 addition & 1 deletion test/scss/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $load-typesetted: true;
@import "../../typesettings";

body {
// @include debug-vertical-alignment();
@include debug-vertical-alignment('fixed', 0.3);
}

.div {
Expand Down
2 changes: 1 addition & 1 deletion test/styl/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/styl/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $load-typesetted= true;
@import "../../_typesettings.styl";

body {
// debug-vertical-alignment()
debug-vertical-alignment(fixed, 0.3)
}

.div {
Expand Down
4 changes: 2 additions & 2 deletions typesettings/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@

// Creates base type baseline overlay and vertical unit overlay.
// To use on the body tag for example: body { @include debug-vertical-alignment(); } and add class va-debug to the body tag
@mixin debug-vertical-alignment($opacity: 0.8, $vertical-unit: $base-vertical-unit, $type-base-line-multi: $base-line-multi, $type-size: $base-em-font-size) {
@mixin debug-vertical-alignment($position: 'absolute', $opacity: 0.8, $vertical-unit: $base-vertical-unit, $type-base-line-multi: $base-line-multi, $type-size: $base-em-font-size) {
position: relative;

&::before,
&::after {
content: "";
position: absolute;
position: #{$position};
top: 0;
left: 0;
bottom: 0;
Expand Down
4 changes: 2 additions & 2 deletions typesettings/_mixins.styl
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ rhythmBorder($border-width= 1px, $lines= $base-line-multi, $font-size= $base-em-

// Creates base type baseline overlay and vertical unit overlay.
// To use on the body tag for example: body { debug-vertical-alignment(); } and add class va-debug to the body tag
debug-vertical-alignment($opacity= 0.8, $vertical-unit= $base-vertical-unit, $type-base-line-multi= $base-line-multi, $type-size= $base-em-font-size)
debug-vertical-alignment($position= absolute,$opacity= 0.8, $vertical-unit= $base-vertical-unit, $type-base-line-multi= $base-line-multi, $type-size= $base-em-font-size)
position: relative;

&::before,
&::after {
content: "";
position: absolute;
position: $position;
top: 0;
left: 0;
bottom: 0;
Expand Down

0 comments on commit bbc8e9c

Please sign in to comment.