Skip to content

Commit

Permalink
Merge pull request #2 from evanshunt/forward-mixins
Browse files Browse the repository at this point in the history
Forward mixins
  • Loading branch information
davejtoews authored Aug 6, 2020
2 parents 61034db + 48ef4eb commit c1c6600
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@evanshunt/derekstrap",
"version": "0.1.0",
"version": "0.1.1",
"description": "A base layout and styles library by Evans Hunt",
"main": "dist/main.js",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion proportional-box/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@use 'mixins' as *;
@forward 'mixins';
6 changes: 3 additions & 3 deletions proportional-box/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center;
display: $display;
position: $position;
display: #{$display};
position: #{$position};

@include proportional-box-aspect-ratio($aspect-ratio, $vw);
}

@mixin proportional-box-aspect-ratio($aspect-ratio, $vw, $offset: 0) {
@mixin proportional-box-aspect-ratio($aspect-ratio, $vw, $offset: 0px) {
height: calc(#{1 / $aspect-ratio} * (100vw - 2 * #{$offset}));
}
2 changes: 2 additions & 0 deletions proportional-text/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
@use '../text-sizing/index' as *;
@use 'mixins' as *;

@forward 'mixins';

html {
font-size: proportional-text($base-font-size, 320px);

Expand Down
2 changes: 1 addition & 1 deletion spacing/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@forward 'variables';
@use 'mixins' as *;
@forward 'mixins';
3 changes: 2 additions & 1 deletion text-sizing/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@forward 'variables';
@use 'mixins' as *;
@forward 'mixins';
@forward 'variables';

body {
@include base-text();
Expand Down

0 comments on commit c1c6600

Please sign in to comment.