-
-
-
Stylus
diff --git a/docs/examples/scss-legacy/defines.scss b/docs/examples/scss-legacy/defines.scss
index 24efaf2..35da72d 100644
--- a/docs/examples/scss-legacy/defines.scss
+++ b/docs/examples/scss-legacy/defines.scss
@@ -55,8 +55,8 @@ $JIG_CONFIG: (
'medium' : 50px,
'xlarge' : 60px
),
- 'min-width' : 320px - 2 * 15px,
- 'max-width' : 1920px,
+ 'min-width' : 360px - (2 * 15px),
+ 'max-width' : 1200px - (2 * 60px),
'base-font-size' : 12px
)
);
diff --git a/docs/examples/scss-legacy/examples.scss b/docs/examples/scss-legacy/examples.scss
index 559e455..151087e 100644
--- a/docs/examples/scss-legacy/examples.scss
+++ b/docs/examples/scss-legacy/examples.scss
@@ -46,7 +46,7 @@
border: 3px solid dodgerblue;
color: white;
- font-size: 1.5rem;
+ font-size: base-font-size-value() * 1.5;
text-shadow: 1px -1px 3px black, 1px 1px 3px black, -1px 1px 3px black, -1px -1px 3px black;
background-size: cover;
@@ -99,110 +99,116 @@
#basic-grid-example {
.examples > .scss-legacy {
- @extend %example-grid;
+ @include content-holder($centered:true);
- > div {
- &:nth-of-type(odd){
- @include grid-item(6);
+ > .grid {
+ @extend %example-grid;
- height: 100px;
- }
-
- &:nth-of-type(even){
- @include grid-item(6);
- height: 75px;
- }
- }
-
-
- @include breakpoint(medium up){
> div {
- &:nth-of-type(1){
- @include grid-item(4);
+ &:nth-of-type(odd){
+ @include grid-item(6);
height: 100px;
}
- &:nth-of-type(2){
- @include grid-item(4);
+ &:nth-of-type(even){
+ @include grid-item(6);
- height: 80px;
+ height: 75px;
}
+ }
- &:nth-of-type(3){
- @include grid-item(4);
- height: 60px;
- }
- &:nth-of-type(4){
- @include grid-item(4);
+ @include breakpoint(medium up){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item(4);
- height: 40px;
- }
+ height: 100px;
+ }
- &:nth-of-type(5){
- @include grid-item(4);
+ &:nth-of-type(2){
+ @include grid-item(4);
+
+ height: 80px;
+ }
- height: 20px;
+ &:nth-of-type(3){
+ @include grid-item(4);
+
+ height: 60px;
+ }
+
+ &:nth-of-type(4){
+ @include grid-item(4);
+
+ height: 40px;
+ }
+
+ &:nth-of-type(5){
+ @include grid-item(4);
+
+ height: 20px;
+ }
}
}
- }
- @include breakpoint(medium down){
- > div {
- &:nth-of-type(3){
- border-color: aqua;
+ @include breakpoint(medium down){
+ > div {
+ &:nth-of-type(3){
+ border-color: aqua;
- background-color: aqua;
- background-image: url('../files/img/block-6.jpg');
+ background-color: aqua;
+ background-image: url('../files/img/block-6.jpg');
+ }
}
}
- }
- @include breakpoint(large){
- > div {
- &:nth-of-type(1){
- @include grid-item();
+ @include breakpoint(large){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item();
- height: 25vh;
- }
+ height: 25vh;
+ }
- &:nth-of-type(2){
- @include grid-item(6);
+ &:nth-of-type(2){
+ @include grid-item(6);
- height: 12.5vh;
- }
+ height: 12.5vh;
+ }
- &:nth-of-type(3){
- @include grid-item(6);
- @include grid-item-align($vertical:bottom);
+ &:nth-of-type(3){
+ @include grid-item(6);
+ @include grid-item-align($vertical:bottom);
- height: 10vh;
- }
+ height: 10vh;
+ }
- &:nth-of-type(4){
- @include grid-item(4);
- @include grid-item-align(center, center);
- order: 2;
+ &:nth-of-type(4){
+ @include grid-item(4);
+ @include grid-item-align(center, center);
+ order: 2;
- width: 100px;
- height: 5vh;
- }
+ width: 100px;
+ height: 5vh;
+ }
- &:nth-of-type(5){
- @include grid-item(4);
- order: 1;
+ &:nth-of-type(5){
+ @include grid-item(4);
+ order: 1;
- height: 10vh;
+ height: 10vh;
+ }
}
}
}
@@ -213,154 +219,160 @@
#advanced-grid-example {
.examples > .scss-legacy {
- @extend %example-grid;
+ @include content-holder($centered:true);
- @include spacing-based-attribute(padding-top, 'xxl');
+ > .grid {
+ @extend %example-grid;
- > div {
- &:nth-of-type(odd){
- @include grid-item(4);
- @include grid-item-align(null, end);
+ @include spacing-based-attribute(padding-top, 'xxl');
- height: gutter-value(2.5, $direction:'vertical');
- }
- &:nth-of-type(even){
- @include grid-item(4);
- height: 75px;
- }
+ > div {
+ &:nth-of-type(odd){
+ @include grid-item(4);
+ @include grid-item-align(null, end);
- &:first-of-type {
- @include grid-item($span:4, $row-span:2);
- @include grid-item-align($vertical:full);
+ height: gutter-value(2.5, $direction:'vertical');
+ }
+
+ &:nth-of-type(even){
+ @include grid-item(4);
- height: auto;
+ height: 75px;
+ }
+
+ &:first-of-type {
+ @include grid-item($span:4, $row-span:2);
+ @include grid-item-align($vertical:full);
+
+ height: auto;
+ }
}
- }
- @include breakpoint(xsmall only){
- > div {
- &:nth-of-type(3){
- border-color: aqua;
+ @include breakpoint(xsmall only){
+ > div {
+ &:nth-of-type(3){
+ border-color: aqua;
- background-color: aqua;
- background-image: url('../files/img/block-6.jpg');
+ background-color: aqua;
+ background-image: url('../files/img/block-6.jpg');
+ }
}
}
- }
- @include breakpoint(medium){
- > div {
- &:nth-of-type(1){
- @include grid-item(4);
- order: 5;
+ @include breakpoint(medium){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item(4);
+ order: 5;
- width: 50%;
- height: gutter-value(3.0);
- }
+ width: 50%;
+ height: gutter-value(3.0);
+ }
- &:nth-of-type(2){
- @include grid-item($start:8, $end:12);
- order: 4;
+ &:nth-of-type(2){
+ @include grid-item($start:8, $end:12);
+ order: 4;
- height: 80px;
- }
+ height: 80px;
+ }
- &:nth-of-type(3){
- @include grid-item($start:6, $span:2);
- @include grid-item-align(full, center);
- order: 3;
+ &:nth-of-type(3){
+ @include grid-item($start:6, $span:2);
+ @include grid-item-align(full, center);
+ order: 3;
- height: 60px;
- }
+ height: 60px;
+ }
- &:nth-of-type(4){
- @include grid-item(8, $row-start:1, $row-end:3);
- @include grid-item-align('right', $vertical:'full');
- order: 2;
+ &:nth-of-type(4){
+ @include grid-item(8, $row-start:1, $row-end:3);
+ @include grid-item-align('right', $vertical:'full');
+ order: 2;
- width: 50%;
- height: auto;
- }
+ width: 50%;
+ height: auto;
+ }
- &:nth-of-type(5){
- @include grid-item(4);
- @include grid-item-align(left, top);
- order: 1;
- z-index: 1;
+ &:nth-of-type(5){
+ @include grid-item(4);
+ @include grid-item-align(left, top);
+ order: 1;
+ z-index: 1;
- width: 200%;
- height: 55px;
+ width: 200%;
+ height: 55px;
- border-color: red;
+ border-color: red;
- background-color: red;
- background-image: url('../files/img/block-7.jpg');
+ background-color: red;
+ background-image: url('../files/img/block-7.jpg');
- transform: rotate(10deg);
+ transform: rotate(10deg);
+ }
}
}
- }
- @include breakpoint(large){
- > div {
- &:nth-of-type(1){
- @include grid-item($start:0, $span:4, $row-start:0, $row-span:1);
- @include grid-item-align($vertical:full);
- order: 1;
+ @include breakpoint(large){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item($start:0, $span:4, $row-start:0, $row-span:1);
+ @include grid-item-align($vertical:full);
+ order: 1;
- width: auto;
- height: 10vh;
- }
+ width: auto;
+ height: 10vh;
+ }
- &:nth-of-type(2){
- @include grid-item($start:4, $end:8, $row-start:0, $row-span:2);
- @include grid-item-align($vertical:full);
- order: 2;
+ &:nth-of-type(2){
+ @include grid-item($start:4, $end:8, $row-start:0, $row-span:2);
+ @include grid-item-align($vertical:full);
+ order: 2;
- height: auto;
- }
+ height: auto;
+ }
- &:nth-of-type(3){
- @include grid-item($start:8, $span:4, $row-start:0, $row-span:3);
- @include grid-item-align($vertical:full);
- order: 3;
+ &:nth-of-type(3){
+ @include grid-item($start:8, $span:4, $row-start:0, $row-span:3);
+ @include grid-item-align($vertical:full);
+ order: 3;
- height: auto;
- }
+ height: auto;
+ }
- &:nth-of-type(4){
- @include grid-item($start:0, $span:4, $row-start:1, $row-end:2);
- @include grid-item-align(right, center);
- order: 4;
+ &:nth-of-type(4){
+ @include grid-item($start:0, $span:4, $row-start:1, $row-end:2);
+ @include grid-item-align(right, center);
+ order: 4;
- width: 100px;
- height: 10vh;
- }
+ width: 100px;
+ height: 10vh;
+ }
- &:nth-of-type(5){
- @include grid-item(6);
- @include grid-item-align(stretch);
- order: 5;
+ &:nth-of-type(5){
+ @include grid-item(6);
+ @include grid-item-align(stretch);
+ order: 5;
- width: auto;
- height: 20vh;
+ width: auto;
+ height: 20vh;
- border-color: dodgerblue;
+ border-color: dodgerblue;
- background-color: dodgerblue;
- background-image: url('../files/img/block-8.jpg');
+ background-color: dodgerblue;
+ background-image: url('../files/img/block-8.jpg');
- transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
}
}
}
@@ -371,181 +383,187 @@
#real-world-grid-example {
.examples > .scss-legacy {
- @extend %example-grid;
+ @include content-holder($centered:true);
- > div {
- &:nth-of-type(1){
- &:before {
- content: 'Stage';
- }
-
- @include grid-item(12);
- order: 1;
-
- @include spacing-based-attribute('height', 'xxl', 3.0);
+ > .grid {
+ @extend %example-grid;
- margin: gutter-value(-1.0);
- margin-bottom: 0;
-
- @include breakpoint(medium){
- margin: gutter-value(-1.0);
- margin-bottom: gutter-value(-3, $direction:vertical);
- }
- @include breakpoint(large){
- margin: gutter-value(-1.0);
- margin-bottom: gutter-value(-3, $direction:vertical);
- }
- }
+ > div {
+ &:nth-of-type(1){
+ &:before {
+ content: 'Stage';
+ }
+ @include grid-item(12);
+ order: 1;
- &:nth-of-type(2){
- &:before {
- content: 'Navbar';
- }
+ @include spacing-based-attribute('height', 'xxl', 3.0);
- @include grid-item(12);
- order: 2;
+ margin: gutter-value(-1.0);
+ margin-bottom: 0;
- @include breakpoint(medium){
- @include grid-item(4, $row-span:2);
- order: 3;
- }
+ @include breakpoint(medium){
+ margin: gutter-value(-1.0);
+ margin-bottom: gutter-value(-3, $direction:vertical);
+ }
- @include breakpoint(large){
- @include grid-item(3);
+ @include breakpoint(large){
+ margin: gutter-value(-1.0);
+ margin-bottom: gutter-value(-3, $direction:vertical);
+ }
}
- }
- &:nth-of-type(3){
- @include grid-item();
- order: 2;
- @include grid-container();
-
- > div {
- &:nth-of-type(1){
- &:before {
- content: 'Text';
- }
-
- @include grid-item(12);
-
- height: spacing-value('md') * 10;
+ &:nth-of-type(2){
+ &:before {
+ content: 'Navbar';
}
- &:nth-of-type(2),
- &:nth-of-type(3),
- &:nth-of-type(4){
- &:before {
- content: 'Teaser';
- }
-
- @include grid-item(12);
+ @include grid-item(12);
+ order: 2;
- height: 100px;
+ @include breakpoint(medium){
+ @include grid-item(4, $row-span:2);
+ order: 3;
}
- &:nth-of-type(3),
- &:nth-of-type(4){
- margin-top: gutter-value(-1, $direction:vertical);
+ @include breakpoint(large){
+ @include grid-item(3);
}
}
+ &:nth-of-type(3){
+ @include grid-item();
+ order: 2;
- @include breakpoint(medium){
- @include grid-item($start:0, $span:8);
+ @include grid-container();
> div {
&:nth-of-type(1){
- height: spacing-value('md') * 7;
+ &:before {
+ content: 'Text';
+ }
+
+ @include grid-item(12);
+
+ height: spacing-value('md') * 10;
}
&:nth-of-type(2),
&:nth-of-type(3),
&:nth-of-type(4){
- @include grid-item(4);
+ &:before {
+ content: 'Teaser';
+ }
+
+ @include grid-item(12);
- height: 75px;
+ height: 100px;
}
&:nth-of-type(3),
&:nth-of-type(4){
- margin-top: 0;
+ margin-top: gutter-value(-1, $direction:vertical);
}
}
- }
- @include breakpoint(large){
- @include grid-item(9);
+ @include breakpoint(medium){
+ @include grid-item($start:0, $span:8);
- > div {
- &:nth-of-type(1){
- height: spacing-value('md') * 5;
- }
+ > div {
+ &:nth-of-type(1){
+ height: spacing-value('md') * 7;
+ }
- &:nth-of-type(2),
- &:nth-of-type(3),
- &:nth-of-type(4){
- height: auto;
+ &:nth-of-type(2),
+ &:nth-of-type(3),
+ &:nth-of-type(4){
+ @include grid-item(4);
+
+ height: 75px;
+ }
+
+ &:nth-of-type(3),
+ &:nth-of-type(4){
+ margin-top: 0;
+ }
}
}
- }
- }
- &:nth-of-type(4){
- &:before {
- content: 'Hint';
+ @include breakpoint(large){
+ @include grid-item(9);
+
+ > div {
+ &:nth-of-type(1){
+ height: spacing-value('md') * 5;
+ }
+
+ &:nth-of-type(2),
+ &:nth-of-type(3),
+ &:nth-of-type(4){
+ height: auto;
+ }
+ }
+ }
}
- @include grid-item($start:1, $end:11);
- order: 4;
- margin-top: gutter-value(-0.5, $direction:'vertical');
- @include breakpoint(medium){
- @include grid-item(8, $start:0);
- }
+ &:nth-of-type(4){
+ &:before {
+ content: 'Hint';
+ }
- @include breakpoint(large){
- @include grid-item($start:3, $span:6);
- }
- }
+ @include grid-item($start:1, $end:11);
+ order: 4;
+ margin-top: gutter-value(-0.5, $direction:'vertical');
+ @include breakpoint(medium){
+ @include grid-item(8, $start:0);
+ }
- &:nth-of-type(5){
- &:before {
- content: 'Footer';
+ @include breakpoint(large){
+ @include grid-item($start:3, $span:6);
+ }
}
- @include grid-item(12);
- order: 5;
- @include spacing-based-attributes((
- 'padding-top' : 'md',
- 'padding-bottom' : 'xl'
- ));
- margin: gutter-value(-1);
- margin-top: gutter-value(1, $direction:vertical);
- @include breakpoint(medium){
- margin: gutter-value(-1);
- margin-top: gutter-value(2, $direction:vertical);
- }
+ &:nth-of-type(5){
+ &:before {
+ content: 'Footer';
+ }
- @include breakpoint(large){
+ @include grid-item(12);
+ order: 5;
+
+ @include spacing-based-attributes((
+ 'padding-top' : 'md',
+ 'padding-bottom' : 'xl'
+ ));
margin: gutter-value(-1);
- margin-top: gutter-value(2.5, $direction:vertical);
+ margin-top: gutter-value(1, $direction:vertical);
+
+ @include breakpoint(medium){
+ margin: gutter-value(-1);
+ margin-top: gutter-value(2, $direction:vertical);
+ }
+
+ @include breakpoint(large){
+ margin: gutter-value(-1);
+ margin-top: gutter-value(2.5, $direction:vertical);
+ }
}
}
}
diff --git a/docs/examples/scss/defines.scss b/docs/examples/scss/defines.scss
index 24efaf2..35da72d 100644
--- a/docs/examples/scss/defines.scss
+++ b/docs/examples/scss/defines.scss
@@ -55,8 +55,8 @@ $JIG_CONFIG: (
'medium' : 50px,
'xlarge' : 60px
),
- 'min-width' : 320px - 2 * 15px,
- 'max-width' : 1920px,
+ 'min-width' : 360px - (2 * 15px),
+ 'max-width' : 1200px - (2 * 60px),
'base-font-size' : 12px
)
);
diff --git a/docs/examples/scss/examples.scss b/docs/examples/scss/examples.scss
index 004436e..4d7de22 100644
--- a/docs/examples/scss/examples.scss
+++ b/docs/examples/scss/examples.scss
@@ -52,7 +52,7 @@
border: 3px solid dodgerblue;
color: white;
- font-size: 1.5rem;
+ font-size: base-font-size-value() * 1.5;
text-shadow: 1px -1px 3px black, 1px 1px 3px black, -1px 1px 3px black, -1px -1px 3px black;
background-size: cover;
@@ -105,110 +105,116 @@
#basic-grid-example {
.examples > .scss {
- @extend %example-grid;
+ @include content-holder($centered:true);
- > div {
- &:nth-of-type(odd){
- @include grid-item(6);
+ > .grid {
+ @extend %example-grid;
- height: 100px;
- }
-
- &:nth-of-type(even){
- @include grid-item(6);
- height: 75px;
- }
- }
-
-
- @include breakpoint(medium up){
> div {
- &:nth-of-type(1){
- @include grid-item(4);
+ &:nth-of-type(odd){
+ @include grid-item(6);
height: 100px;
}
- &:nth-of-type(2){
- @include grid-item(4);
+ &:nth-of-type(even){
+ @include grid-item(6);
- height: 80px;
+ height: 75px;
}
+ }
- &:nth-of-type(3){
- @include grid-item(4);
- height: 60px;
- }
- &:nth-of-type(4){
- @include grid-item(4);
+ @include breakpoint(medium up){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item(4);
- height: 40px;
- }
+ height: 100px;
+ }
- &:nth-of-type(5){
- @include grid-item(4);
+ &:nth-of-type(2){
+ @include grid-item(4);
+
+ height: 80px;
+ }
- height: 20px;
+ &:nth-of-type(3){
+ @include grid-item(4);
+
+ height: 60px;
+ }
+
+ &:nth-of-type(4){
+ @include grid-item(4);
+
+ height: 40px;
+ }
+
+ &:nth-of-type(5){
+ @include grid-item(4);
+
+ height: 20px;
+ }
}
}
- }
- @include breakpoint(medium down){
- > div {
- &:nth-of-type(3){
- border-color: aqua;
+ @include breakpoint(medium down){
+ > div {
+ &:nth-of-type(3){
+ border-color: aqua;
- background-color: aqua;
- background-image: url('../files/img/block-6.jpg');
+ background-color: aqua;
+ background-image: url('../files/img/block-6.jpg');
+ }
}
}
- }
- @include breakpoint(large){
- > div {
- &:nth-of-type(1){
- @include grid-item();
+ @include breakpoint(large){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item();
- height: 25vh;
- }
+ height: 25vh;
+ }
- &:nth-of-type(2){
- @include grid-item(6);
+ &:nth-of-type(2){
+ @include grid-item(6);
- height: 12.5vh;
- }
+ height: 12.5vh;
+ }
- &:nth-of-type(3){
- @include grid-item(6);
- @include grid-item-align($vertical:bottom);
+ &:nth-of-type(3){
+ @include grid-item(6);
+ @include grid-item-align($vertical:bottom);
- height: 10vh;
- }
+ height: 10vh;
+ }
- &:nth-of-type(4){
- @include grid-item(4);
- @include grid-item-align(center, center);
- order: 2;
+ &:nth-of-type(4){
+ @include grid-item(4);
+ @include grid-item-align(center, center);
+ order: 2;
- width: 100px;
- height: 5vh;
- }
+ width: 100px;
+ height: 5vh;
+ }
- &:nth-of-type(5){
- @include grid-item(4);
- order: 1;
+ &:nth-of-type(5){
+ @include grid-item(4);
+ order: 1;
- height: 10vh;
+ height: 10vh;
+ }
}
}
}
@@ -219,154 +225,160 @@
#advanced-grid-example {
.examples > .scss {
- @extend %example-grid;
+ @include content-holder($centered:true);
- @include spacing-based-attribute(padding-top, 'xxl');
+ > .grid {
+ @extend %example-grid;
- > div {
- &:nth-of-type(odd){
- @include grid-item(4);
- @include grid-item-align(null, end);
+ @include spacing-based-attribute(padding-top, 'xxl');
- height: gutter-value(2.5, $direction:'vertical');
- }
- &:nth-of-type(even){
- @include grid-item(4);
- height: 75px;
- }
+ > div {
+ &:nth-of-type(odd){
+ @include grid-item(4);
+ @include grid-item-align(null, end);
- &:first-of-type {
- @include grid-item($span:4, $row-span:2);
- @include grid-item-align($vertical:full);
+ height: gutter-value(2.5, $direction:'vertical');
+ }
- height: auto;
+ &:nth-of-type(even){
+ @include grid-item(4);
+
+ height: 75px;
+ }
+
+ &:first-of-type {
+ @include grid-item($span:4, $row-span:2);
+ @include grid-item-align($vertical:full);
+
+ height: auto;
+ }
}
- }
- @include breakpoint(xsmall only){
- > div {
- &:nth-of-type(3){
- border-color: aqua;
+ @include breakpoint(xsmall only){
+ > div {
+ &:nth-of-type(3){
+ border-color: aqua;
- background-color: aqua;
- background-image: url('../files/img/block-6.jpg');
+ background-color: aqua;
+ background-image: url('../files/img/block-6.jpg');
+ }
}
}
- }
- @include breakpoint(medium){
- > div {
- &:nth-of-type(1){
- @include grid-item(4);
- order: 5;
+ @include breakpoint(medium){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item(4);
+ order: 5;
- width: 50%;
- height: gutter-value(3.0);
- }
+ width: 50%;
+ height: gutter-value(3.0);
+ }
- &:nth-of-type(2){
- @include grid-item($start:8, $end:12);
- order: 4;
+ &:nth-of-type(2){
+ @include grid-item($start:8, $end:12);
+ order: 4;
- height: 80px;
- }
+ height: 80px;
+ }
- &:nth-of-type(3){
- @include grid-item($start:6, $span:2);
- @include grid-item-align(full, center);
- order: 3;
+ &:nth-of-type(3){
+ @include grid-item($start:6, $span:2);
+ @include grid-item-align(full, center);
+ order: 3;
- height: 60px;
- }
+ height: 60px;
+ }
- &:nth-of-type(4){
- @include grid-item(8, $row-start:1, $row-end:3);
- @include grid-item-align('right', $vertical:'full');
- order: 2;
+ &:nth-of-type(4){
+ @include grid-item(8, $row-start:1, $row-end:3);
+ @include grid-item-align('right', $vertical:'full');
+ order: 2;
- width: 50%;
- height: auto;
- }
+ width: 50%;
+ height: auto;
+ }
- &:nth-of-type(5){
- @include grid-item(4);
- @include grid-item-align(left, top);
- order: 1;
- z-index: 1;
+ &:nth-of-type(5){
+ @include grid-item(4);
+ @include grid-item-align(left, top);
+ order: 1;
+ z-index: 1;
- width: 200%;
- height: 55px;
+ width: 200%;
+ height: 55px;
- border-color: red;
+ border-color: red;
- background-color: red;
- background-image: url('../files/img/block-7.jpg');
+ background-color: red;
+ background-image: url('../files/img/block-7.jpg');
- transform: rotate(10deg);
+ transform: rotate(10deg);
+ }
}
}
- }
- @include breakpoint(large){
- > div {
- &:nth-of-type(1){
- @include grid-item($start:0, $span:4, $row-start:0, $row-span:1);
- @include grid-item-align($vertical:full);
- order: 1;
+ @include breakpoint(large){
+ > div {
+ &:nth-of-type(1){
+ @include grid-item($start:0, $span:4, $row-start:0, $row-span:1);
+ @include grid-item-align($vertical:full);
+ order: 1;
- width: auto;
- height: 10vh;
- }
+ width: auto;
+ height: 10vh;
+ }
- &:nth-of-type(2){
- @include grid-item($start:4, $end:8, $row-start:0, $row-span:2);
- @include grid-item-align($vertical:full);
- order: 2;
+ &:nth-of-type(2){
+ @include grid-item($start:4, $end:8, $row-start:0, $row-span:2);
+ @include grid-item-align($vertical:full);
+ order: 2;
- height: auto;
- }
+ height: auto;
+ }
- &:nth-of-type(3){
- @include grid-item($start:8, $span:4, $row-start:0, $row-span:3);
- @include grid-item-align($vertical:full);
- order: 3;
+ &:nth-of-type(3){
+ @include grid-item($start:8, $span:4, $row-start:0, $row-span:3);
+ @include grid-item-align($vertical:full);
+ order: 3;
- height: auto;
- }
+ height: auto;
+ }
- &:nth-of-type(4){
- @include grid-item($start:0, $span:4, $row-start:1, $row-end:2);
- @include grid-item-align(right, center);
- order: 4;
+ &:nth-of-type(4){
+ @include grid-item($start:0, $span:4, $row-start:1, $row-end:2);
+ @include grid-item-align(right, center);
+ order: 4;
- width: 100px;
- height: 10vh;
- }
+ width: 100px;
+ height: 10vh;
+ }
- &:nth-of-type(5){
- @include grid-item(6);
- @include grid-item-align(stretch);
- order: 5;
+ &:nth-of-type(5){
+ @include grid-item(6);
+ @include grid-item-align(stretch);
+ order: 5;
- width: auto;
- height: 20vh;
+ width: auto;
+ height: 20vh;
- border-color: dodgerblue;
+ border-color: dodgerblue;
- background-color: dodgerblue;
- background-image: url('../files/img/block-8.jpg');
+ background-color: dodgerblue;
+ background-image: url('../files/img/block-8.jpg');
- transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
}
}
}
@@ -377,182 +389,188 @@
#real-world-grid-example {
.examples > .scss {
- @extend %example-grid;
+ @include content-holder($centered:true);
- > div {
- &:nth-of-type(1){
- &:before {
- content: 'Stage';
- }
+ > .grid {
+ @extend %example-grid;
- @include grid-item(12);
- order: 1;
- @include spacing-based-attribute('height', 'xxl', 3.0);
-
- margin: gutter-value(-1.0);
- margin-bottom: 0;
-
- @include breakpoint(medium){
- margin: gutter-value(-1.0);
- margin-bottom: gutter-value(-3, $direction:vertical);
- }
-
- @include breakpoint(large){
- margin: gutter-value(-1.0);
- margin-bottom: gutter-value(-3, $direction:vertical);
- }
- }
+ > div {
+ &:nth-of-type(1){
+ &:before {
+ content: 'Stage';
+ }
+ @include grid-item(12);
+ order: 1;
- &:nth-of-type(2){
- &:before {
- content: 'Navbar';
- }
+ @include spacing-based-attribute('height', 'xxl', 3.0);
- @include grid-item(12);
- order: 2;
+ margin: gutter-value(-1.0);
+ margin-bottom: 0;
- @include breakpoint(medium){
- @include grid-item(4, $row-span:2);
- order: 3;
- }
+ @include breakpoint(medium){
+ margin: gutter-value(-1.0);
+ margin-bottom: gutter-value(-3, $direction:vertical);
+ }
- @include breakpoint(large){
- @include grid-item(3);
+ @include breakpoint(large){
+ margin: gutter-value(-1.0);
+ margin-bottom: gutter-value(-3, $direction:vertical);
+ }
}
- }
-
- &:nth-of-type(3){
- @include grid-item();
- order: 2;
- @include grid-container();
-
- > div {
- &:nth-of-type(1){
- &:before {
- content: 'Text';
- }
-
- @include grid-item(12);
-
- height: spacing-value('md') * 10;
+ &:nth-of-type(2){
+ &:before {
+ content: 'Navbar';
}
- &:nth-of-type(2),
- &:nth-of-type(3),
- &:nth-of-type(4){
- &:before {
- content: 'Teaser';
- }
-
- @include grid-item(12);
+ @include grid-item(12);
+ order: 2;
- height: 100px;
+ @include breakpoint(medium){
+ @include grid-item(4, $row-span:2);
+ order: 3;
}
- &:nth-of-type(3),
- &:nth-of-type(4){
- margin-top: gutter-value(-1, $direction:vertical);
+ @include breakpoint(large){
+ @include grid-item(3);
}
}
- @include breakpoint(medium){
- @include grid-item($start:0, $span:8);
+ &:nth-of-type(3){
+ @include grid-item();
+ order: 2;
+
+ @include grid-container();
> div {
&:nth-of-type(1){
- height: spacing-value('md') * 7;
+ &:before {
+ content: 'Text';
+ }
+
+ @include grid-item(12);
+
+ height: spacing-value('md') * 10;
}
&:nth-of-type(2),
&:nth-of-type(3),
&:nth-of-type(4){
- @include grid-item(4);
+ &:before {
+ content: 'Teaser';
+ }
+
+ @include grid-item(12);
- height: 75px;
+ height: 100px;
}
&:nth-of-type(3),
&:nth-of-type(4){
- margin-top: 0;
+ margin-top: gutter-value(-1, $direction:vertical);
}
}
- }
- @include breakpoint(large){
- @include grid-item(9);
+ @include breakpoint(medium){
+ @include grid-item($start:0, $span:8);
- > div {
- &:nth-of-type(1){
- height: spacing-value('md') * 5;
- }
+ > div {
+ &:nth-of-type(1){
+ height: spacing-value('md') * 7;
+ }
- &:nth-of-type(2),
- &:nth-of-type(3),
- &:nth-of-type(4){
- height: auto;
+ &:nth-of-type(2),
+ &:nth-of-type(3),
+ &:nth-of-type(4){
+ @include grid-item(4);
+
+ height: 75px;
+ }
+
+ &:nth-of-type(3),
+ &:nth-of-type(4){
+ margin-top: 0;
+ }
}
}
- }
- }
- &:nth-of-type(4){
- &:before {
- content: 'Hint';
+ @include breakpoint(large){
+ @include grid-item(9);
+
+ > div {
+ &:nth-of-type(1){
+ height: spacing-value('md') * 5;
+ }
+
+ &:nth-of-type(2),
+ &:nth-of-type(3),
+ &:nth-of-type(4){
+ height: auto;
+ }
+ }
+ }
}
- @include grid-item($start:1, $end:11);
- order: 4;
- margin-top: gutter-value(-0.5, $direction:'vertical');
- @include breakpoint(medium){
- @include grid-item(8, $start:0);
- }
+ &:nth-of-type(4){
+ &:before {
+ content: 'Hint';
+ }
- @include breakpoint(large){
- @include grid-item($start:3, $span:6);
- }
- }
+ @include grid-item($start:1, $end:11);
+ order: 4;
+ margin-top: gutter-value(-0.5, $direction:'vertical');
+ @include breakpoint(medium){
+ @include grid-item(8, $start:0);
+ }
- &:nth-of-type(5){
- &:before {
- content: 'Footer';
+ @include breakpoint(large){
+ @include grid-item($start:3, $span:6);
+ }
}
- @include grid-item(12);
- order: 5;
- @include spacing-based-attributes((
- 'padding-top' : 'md',
- 'padding-bottom' : 'xl'
- ));
- margin: gutter-value(-1);
- margin-top: gutter-value(1, $direction:vertical);
- @include breakpoint(medium){
- margin: gutter-value(-1);
- margin-top: gutter-value(2, $direction:vertical);
- }
+ &:nth-of-type(5){
+ &:before {
+ content: 'Footer';
+ }
- @include breakpoint(large){
+ @include grid-item(12);
+ order: 5;
+
+ @include spacing-based-attributes((
+ 'padding-top' : 'md',
+ 'padding-bottom' : 'xl'
+ ));
margin: gutter-value(-1);
- margin-top: gutter-value(2.5, $direction:vertical);
+ margin-top: gutter-value(1, $direction:vertical);
+
+ @include breakpoint(medium){
+ margin: gutter-value(-1);
+ margin-top: gutter-value(2, $direction:vertical);
+ }
+
+ @include breakpoint(large){
+ margin: gutter-value(-1);
+ margin-top: gutter-value(2.5, $direction:vertical);
+ }
}
}
}
diff --git a/docs/examples/stylus/defines.styl b/docs/examples/stylus/defines.styl
index cb3bfdc..52b8a28 100644
--- a/docs/examples/stylus/defines.styl
+++ b/docs/examples/stylus/defines.styl
@@ -55,8 +55,8 @@ $JIG_CONFIG = {
'large' : 50px,
'xlarge' : 60px
},
- 'min-width' : 320px - 2 * 15px,
- 'max-width' : 1920px,
+ 'min-width' : 360px - (2 * 15px),
+ 'max-width' : 1200px - (2 * 60px),
'base-font-size' : 12px
}
}
diff --git a/docs/examples/stylus/examples.styl b/docs/examples/stylus/examples.styl
index 76f1994..d7ecbd4 100644
--- a/docs/examples/stylus/examples.styl
+++ b/docs/examples/stylus/examples.styl
@@ -44,7 +44,7 @@ $example-grid
border 3px solid dodgerblue
color white
- font-size 1.5rem
+ font-size base-font-size-value() * 1.5
text-shadow 1px -1px 3px black, 1px 1px 3px black, -1px 1px 3px black, -1px -1px 3px black
background-size cover
@@ -87,381 +87,396 @@ $example-grid
#basic-grid-example
.examples > .stylus
- @extend $example-grid
+ content-holder($centered:true)
- > div
- &:nth-of-type(odd)
- grid-item(6)
-
- height 100px
-
- &:nth-of-type(even)
- grid-item(6)
+ > .grid
+ @extend $example-grid
- height 75px
-
- +breakpoint(medium up)
> div
- &:nth-of-type(1)
- grid-item(4)
+ &:nth-of-type(odd)
+ grid-item(6)
height 100px
- &:nth-of-type(2)
- grid-item(4)
+ &:nth-of-type(even)
+ grid-item(6)
- height 80px
+ height 75px
- &:nth-of-type(3)
- grid-item(4)
- height 60px
- &:nth-of-type(4)
- grid-item(4)
+ +breakpoint(medium up)
+ > div
+ &:nth-of-type(1)
+ grid-item(4)
- height 40px
+ height 100px
- &:nth-of-type(5)
- grid-item(4)
+ &:nth-of-type(2)
+ grid-item(4)
- height 20px
+ height 80px
+ &:nth-of-type(3)
+ grid-item(4)
+ height 60px
- +breakpoint(medium down)
- > div
- &:nth-of-type(3)
- border-color aqua
+ &:nth-of-type(4)
+ grid-item(4)
- background-color aqua
- background-image url('../files/img/block-6.jpg')
+ height 40px
+ &:nth-of-type(5)
+ grid-item(4)
+ height 20px
- +breakpoint(large)
- > div
- &:nth-of-type(1)
- grid-item()
- height 25vh
- &:nth-of-type(2)
- grid-item(6)
+ +breakpoint(medium down)
+ > div
+ &:nth-of-type(3)
+ border-color aqua
- height 12.5vh
+ background-color aqua
+ background-image url('../files/img/block-6.jpg')
- &:nth-of-type(3)
- grid-item(6)
- grid-item-align($vertical:bottom)
- height 10vh
- &:nth-of-type(4)
- grid-item(4)
- grid-item-align(center, center)
- order 2
+ +breakpoint(large)
+ > div
+ &:nth-of-type(1)
+ grid-item()
- width 100px
- height 5vh
+ height 25vh
- &:nth-of-type(5)
- grid-item(4)
- order 1
+ &:nth-of-type(2)
+ grid-item(6)
- height 10vh
+ height 12.5vh
+ &:nth-of-type(3)
+ grid-item(6)
+ grid-item-align($vertical:bottom)
+ height 10vh
-#advanced-grid-example
- .examples > .stylus
- @extend $example-grid
+ &:nth-of-type(4)
+ grid-item(4)
+ grid-item-align(center, center)
+ order 2
- spacing-based-attribute(padding-top, 'xxl')
+ width 100px
+ height 5vh
+ &:nth-of-type(5)
+ grid-item(4)
+ order 1
+ height 10vh
- > div
- &:nth-of-type(odd)
- grid-item(4)
- grid-item-align(null, end)
- height gutter-value(2.5, $direction:'vertical')
- &:nth-of-type(even)
- grid-item(4)
+#advanced-grid-example
+ .examples > .stylus
+ content-holder($centered:true)
- height 75px
- &:first-of-type
- grid-item($span:4, $row-span:2)
- grid-item-align($vertical:full)
- height auto
+ > .grid
+ @extend $example-grid
+
+ spacing-based-attribute(padding-top, 'xxl')
- +breakpoint(xsmall only)
> div
- &:nth-of-type(3)
- border-color aqua
+ &:nth-of-type(odd)
+ grid-item(4)
+ grid-item-align(null, end)
- background-color aqua
- background-image url('../files/img/block-6.jpg')
+ height gutter-value(2.5, $direction:'vertical')
+ &:nth-of-type(even)
+ grid-item(4)
+ height 75px
- set-auto-breakpoint(medium)
- +breakpoint(medium)
- > div
- &:nth-of-type(1)
- grid-item(4)
- order 5
+ &:first-of-type
+ grid-item($span:4, $row-span:2)
+ grid-item-align($vertical:full)
- width 50%
- height gutter-value(3.0)
+ height auto
- &:nth-of-type(2)
- grid-item($start:8, $end:12)
- order 4
- height 80px
- &:nth-of-type(3)
- grid-item($start:6, $span:2)
- grid-item-align(full, center)
- order 3
+ +breakpoint(xsmall only)
+ > div
+ &:nth-of-type(3)
+ border-color aqua
- height 60px
+ background-color aqua
+ background-image url('../files/img/block-6.jpg')
- &:nth-of-type(4)
- grid-item(8, $row-start:1, $row-end:3)
- grid-item-align('right', $vertical:'full')
- order 2
- width 50%
- height auto
- &:nth-of-type(5)
- grid-item(4)
- grid-item-align(left, top)
- order 1
- z-index 1
+ set-auto-breakpoint(medium)
+ +breakpoint(medium)
+ > div
+ &:nth-of-type(1)
+ grid-item(4)
+ order 5
- width 200%
- height 55px
+ width 50%
+ height gutter-value(3.0)
- border-color red
+ &:nth-of-type(2)
+ grid-item($start:8, $end:12)
+ order 4
- background-color red
- background-image url('../files/img/block-7.jpg')
+ height 80px
- transform rotate(10deg)
+ &:nth-of-type(3)
+ grid-item($start:6, $span:2)
+ grid-item-align(full, center)
+ order 3
+ height 60px
+ &:nth-of-type(4)
+ grid-item(8, $row-start:1, $row-end:3)
+ grid-item-align('right', $vertical:'full')
+ order 2
- +breakpoint(large)
- > div
- &:nth-of-type(1)
- grid-item($start:0, $span:4, $row-start:0, $row-span:1)
- grid-item-align($vertical:full)
- order 1
+ width 50%
+ height auto
- width auto
- height 10vh
+ &:nth-of-type(5)
+ grid-item(4)
+ grid-item-align(left, top)
+ order 1
+ z-index 1
- &:nth-of-type(2)
- grid-item($start:4, $end:8, $row-start:0, $row-span:2)
- grid-item-align($vertical:full)
- order 2
+ width 200%
+ height 55px
- height auto
+ border-color red
- &:nth-of-type(3)
- grid-item($start:8, $span:4, $row-start:0, $row-span:3)
- grid-item-align($vertical:full)
- order 3
+ background-color red
+ background-image url('../files/img/block-7.jpg')
- height auto
+ transform rotate(10deg)
- &:nth-of-type(4)
- grid-item($start:0, $span:4, $row-start:1, $row-end:2)
- grid-item-align(right, center)
- order 4
- width 100px
- height 10vh
- &:nth-of-type(5)
- grid-item(6)
- grid-item-align(stretch)
- order 5
+ +breakpoint(large)
+ > div
+ &:nth-of-type(1)
+ grid-item($start:0, $span:4, $row-start:0, $row-span:1)
+ grid-item-align($vertical:full)
+ order 1
- width auto
- height 20vh
+ width auto
+ height 10vh
- border-color dodgerblue
+ &:nth-of-type(2)
+ grid-item($start:4, $end:8, $row-start:0, $row-span:2)
+ grid-item-align($vertical:full)
+ order 2
- background-color dodgerblue
- background-image url('../files/img/block-8.jpg')
+ height auto
- transform rotate(0deg)
+ &:nth-of-type(3)
+ grid-item($start:8, $span:4, $row-start:0, $row-span:3)
+ grid-item-align($vertical:full)
+ order 3
+ height auto
+ &:nth-of-type(4)
+ grid-item($start:0, $span:4, $row-start:1, $row-end:2)
+ grid-item-align(right, center)
+ order 4
-#real-world-grid-example
- .examples > .stylus
- @extend $example-grid
+ width 100px
+ height 10vh
+ &:nth-of-type(5)
+ grid-item(6)
+ grid-item-align(stretch)
+ order 5
+ width auto
+ height 20vh
- > div
- &:nth-of-type(1)
- &:before
- content 'Stage'
+ border-color dodgerblue
- grid-item(12)
- order 1
+ background-color dodgerblue
+ background-image url('../files/img/block-8.jpg')
- spacing-based-attribute('height', 'xxl', 3.0)
+ transform rotate(0deg)
- margin gutter-value(-1.0)
- margin-bottom 0
- +breakpoint(medium)
- margin gutter-value(-1.0, $breakpoint:medium)
- margin-bottom gutter-value(-3, $breakpoint:medium, $direction:vertical)
- set-auto-breakpoint(large)
- +breakpoint(large)
- margin gutter-value(-1.0)
- margin-bottom gutter-value(-3, $direction:vertical)
+#real-world-grid-example
+ .examples > .stylus
+ content-holder($centered:true)
- &:nth-of-type(2)
- &:before
- content 'Navbar'
+ > .grid
+ @extend $example-grid
- grid-item(12)
- order 2
- +breakpoint(medium)
- grid-item(4, $row-span:2)
- order 3
- +breakpoint(large)
- grid-item(3)
+ > div
+ &:nth-of-type(1)
+ &:before
+ content 'Stage'
+ grid-item(12)
+ order 1
+ spacing-based-attribute('height', 'xxl', 3.0)
- &:nth-of-type(3)
- grid-item()
- order 2
+ margin gutter-value(-1.0)
+ margin-bottom 0
- grid-container()
+ +breakpoint(medium)
+ margin gutter-value(-1.0, $breakpoint:medium)
+ margin-bottom gutter-value(-3, $breakpoint:medium, $direction:vertical)
- > div
- &:nth-of-type(1)
- &:before
- content 'Text'
+ set-auto-breakpoint(large)
+ +breakpoint(large)
+ margin gutter-value(-1.0)
+ margin-bottom gutter-value(-3, $direction:vertical)
- grid-item(12)
- height spacing-value('md') * 10
- &:nth-of-type(2)
- &:nth-of-type(3)
- &:nth-of-type(4)
- &:before
- content 'Teaser'
+ &:nth-of-type(2)
+ &:before
+ content 'Navbar'
- grid-item(12)
+ grid-item(12)
+ order 2
- height 100px
+ +breakpoint(medium)
+ grid-item(4, $row-span:2)
+ order 3
- &:nth-of-type(3)
- &:nth-of-type(4)
- margin-top gutter-value(-1, $direction:vertical)
+ +breakpoint(large)
+ grid-item(3)
- set-auto-breakpoint(medium)
- +breakpoint(medium)
- grid-item($start:0, $span:8)
+ &:nth-of-type(3)
+ grid-item()
+ order 2
+
+ grid-container()
> div
&:nth-of-type(1)
- height spacing-value('md') * 7
+ &:before
+ content 'Text'
+
+ grid-item(12)
+
+ height spacing-value('md') * 10
&:nth-of-type(2)
&:nth-of-type(3)
&:nth-of-type(4)
- grid-item(4)
+ &:before
+ content 'Teaser'
- height 75px
+ grid-item(12)
+
+ height 100px
&:nth-of-type(3)
&:nth-of-type(4)
- margin-top 0
+ margin-top gutter-value(-1, $direction:vertical)
- set-auto-breakpoint(large)
- +breakpoint(large)
- grid-item(9)
+ set-auto-breakpoint(medium)
+ +breakpoint(medium)
+ grid-item($start:0, $span:8)
- > div
- &:nth-of-type(1)
- height spacing-value('md') * 5
+ > div
+ &:nth-of-type(1)
+ height spacing-value('md') * 7
- &:nth-of-type(2)
- &:nth-of-type(3)
- &:nth-of-type(4)
- height auto
+ &:nth-of-type(2)
+ &:nth-of-type(3)
+ &:nth-of-type(4)
+ grid-item(4)
+
+ height 75px
+ &:nth-of-type(3)
+ &:nth-of-type(4)
+ margin-top 0
- &:nth-of-type(4)
- &:before
- content 'Hint'
- grid-item($start:1, $end:11)
- order 4
+ set-auto-breakpoint(large)
+ +breakpoint(large)
+ grid-item(9)
- margin-top gutter-value(-0.5, $direction:'vertical')
+ > div
+ &:nth-of-type(1)
+ height spacing-value('md') * 5
- +breakpoint(medium)
- grid-item(8, $start:0)
+ &:nth-of-type(2)
+ &:nth-of-type(3)
+ &:nth-of-type(4)
+ height auto
- +breakpoint(large)
- grid-item($start:3, $span:6)
+ &:nth-of-type(4)
+ &:before
+ content 'Hint'
- &:nth-of-type(5)
- &:before
- content 'Footer'
+ grid-item($start:1, $end:11)
+ order 4
- grid-item(12)
- order 5
+ margin-top gutter-value(-0.5, $direction:'vertical')
- spacing-based-attributes({
- 'padding-top' : 'md',
- 'padding-bottom' : 'xl'
- })
- margin gutter-value(-1)
- margin-top gutter-value(1, $direction:vertical)
+ +breakpoint(medium)
+ grid-item(8, $start:0)
- +breakpoint(medium)
- margin gutter-value(-1, $breakpoint:medium)
- margin-top gutter-value(2, $breakpoint:medium, $direction:vertical)
+ +breakpoint(large)
+ grid-item($start:3, $span:6)
- set-auto-breakpoint(large)
- +breakpoint(large)
+
+
+ &:nth-of-type(5)
+ &:before
+ content 'Footer'
+
+ grid-item(12)
+ order 5
+
+ spacing-based-attributes({
+ 'padding-top' : 'md',
+ 'padding-bottom' : 'xl'
+ })
margin gutter-value(-1)
- margin-top gutter-value(2.5, $direction:vertical)
+ margin-top gutter-value(1, $direction:vertical)
+
+ +breakpoint(medium)
+ margin gutter-value(-1, $breakpoint:medium)
+ margin-top gutter-value(2, $breakpoint:medium, $direction:vertical)
+
+ set-auto-breakpoint(large)
+ +breakpoint(large)
+ margin gutter-value(-1)
+ margin-top gutter-value(2.5, $direction:vertical)
diff --git a/gulpfile.js b/gulpfile.js
index 0174090..62a9a6f 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,6 +1,6 @@
//###[ IMPORTS ]########################################################################################################
-import fs from 'fs';
+import fs from 'node:fs';
import yargs from 'yargs';
import log from 'fancy-log';
import {deleteAsync as del} from 'del';
@@ -10,7 +10,7 @@ import shell from 'gulp-shell';
import sourcemaps from 'gulp-sourcemaps';
import connect from 'gulp-connect';
-import dartSass from 'sass';
+import * as dartSass from 'sass';
import nodeSass from 'node-sass';
import gulpSass from 'gulp-sass';
import stylus from 'gulp-stylus';
diff --git a/package.json b/package.json
index 866821c..2ef7a71 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name" : "@oktarintentakel/jig",
- "version" : "0.1.10-beta",
+ "version" : "0.1.11-beta",
"author" : "Sebastian Schlapkohl",
"description" : "A \"foundationish\" grid solution for SCSS and Stylus with native CSS grid and sane defaults and helpers for responsive websites.",
"license" : "MIT",
@@ -41,9 +41,9 @@
"jsdoc" : "^3.6.11",
"node-sass" : "~9.0.0",
"normalize.css" : "^8.0.1",
- "sass" : "~1.66.1",
+ "sass" : "~1.77.5",
"serve-static" : "^1.15.0",
- "stylus" : "~0.62.0",
+ "stylus" : "~0.63.0",
"yargs" : "^17.7.2"
}
}
diff --git a/source/scss-legacy/jig/_index.scss b/source/scss-legacy/jig/_index.scss
index c5523f4..1e0a17e 100644
--- a/source/scss-legacy/jig/_index.scss
+++ b/source/scss-legacy/jig/_index.scss
@@ -2,4 +2,5 @@
@import 'util';
@import 'breakpoints';
@import 'grid';
+@import 'content';
@import 'spacing';
diff --git a/source/scss-legacy/jig/content.scss b/source/scss-legacy/jig/content.scss
new file mode 100644
index 0000000..ccc775d
--- /dev/null
+++ b/source/scss-legacy/jig/content.scss
@@ -0,0 +1,167 @@
+/**
+ * @namespace Content
+ */
+
+
+
+/**
+ * @namespace Content:content-holder
+ */
+
+/**
+ * Adds properties to the current element, which make it a "content holder", meaning, that it
+ * adheres to the defined min/max content widths and keeps the content away from the browser edges by
+ * defining margins according to the defined responsive content paddings.
+ *
+ * Min and max widths are only rendered if they are defined in the jig config, as are content paddings.
+ *
+ * A content holder can be used as the base container definition for non-breakout elements on a page,
+ * which is not supposed to grow indefinitely horizontally.
+ *
+ * A content holder can be a grid container at the same time, these things do not exclude themselves and
+ * are even a very common use case.
+ *
+ * @memberof Content:content-holder
+ * @function
+ * @name content-holder
+ * @alias content-holder
+ *
+ * @param {Boolean} [$padded=true] - if true, config-defined responsive content padding gets applied to the element
+ * @param {Boolean} [$centered=true] - if true, element gets auto-centered using auto margins
+ *
+ * @example
+ * \@include content-holder();
+ */
+@mixin content-holder($padded:true, $centered:false){
+ $breakpoint-names: map-keys($jig---breakpoint-config);
+ $smallest-breakpoint: nth($breakpoint-names, 1);
+ $largest-breakpoint: nth($breakpoint-names, -1);
+
+ $min-width: content-width-value('min');
+ $max-width: content-width-value('max');
+
+ @if $min-width != null {
+ min-width: $min-width + (2 * content-padding-value($smallest-breakpoint));
+ }
+ @if $max-width != null {
+ max-width: $max-width + (2 * content-padding-value($largest-breakpoint));
+ }
+
+ @if $centered {
+ margin-right: auto;
+ margin-left: auto;
+ }
+
+ @if $padded {
+ $content-padding: map-get($jig---content-config, 'padding');
+
+ @if $content-padding != null {
+ @include attributes-for-breakpoints((
+ 'padding-left' : $content-padding,
+ 'padding-right' : $content-padding,
+ ));
+ }
+ }
+}
+
+
+
+/**
+ * @namespace Content:content-padding-value
+ */
+
+/**
+ * Returns the defined content padding for a/the current breakpoint.
+ *
+ * @memberof Content:content-padding-value
+ * @function
+ * @name content-padding-value
+ * @alias content-padding-value
+ *
+ * @param {String} [$breakpoint='auto'] - a defined breakpoint name or "auto", to use the current breakpoint at the point of usage
+ * @returns {Number} the determined content padding value
+ * @throws error if no content padding value could be determined, based on given breakpoint
+ *
+ * @example
+ * \@include breakpoint(medium){
+ * padding-left: content-padding-value();
+ * }
+ * margin-right: content-padding-value($breakpoint:'small');
+ */
+@function content-padding-value($breakpoint:'auto'){
+ $padding: map-get($jig---content-config, 'padding');
+ $res: null;
+
+ @if $padding != null {
+ @if type-of($padding) == 'map' {
+ $res: breakpoint-value($padding, $breakpoint);
+ } @else {
+ $res: $padding;
+ }
+ }
+
+ @if $res == null {
+ @error 'jig:content-padding-value | could not resolve content padding, check breakpoint';
+ }
+
+ @return $res;
+}
+
+
+
+/**
+ * @namespace Content:content-width-value
+ */
+
+/**
+ * Returns the defined min/max content width.
+ *
+ * @memberof Content:content-width-value
+ * @function
+ * @name content-width-value
+ * @alias content-width-value
+ *
+ * @param {String} [$min-max='max'] - either "min" or "max", defines if min or max content-width is returned
+ * @param {?Number} [$default=null] - the default value to return if the width definition cannot be found
+ * @returns {Number|null} the determined content width value, may be null if width is not defined (depending on default value)
+ *
+ * @example
+ * max-width: content-width-value();
+ * min-width: content-width-value('min', 0);
+ */
+@function content-width-value($min-max:'max', $default:null){
+ $width: map-get($jig---content-config, 'max-width');
+ @if $min-max == 'min' {
+ $width: map-get($jig---content-config, 'min-width');
+ }
+
+ @if $width == null {
+ $width: $default;
+ }
+
+ @return $width;
+}
+
+
+
+/**
+ * @namespace Content:base-font-size-value
+ */
+
+/**
+ * Returns the base font size, which is most likely applied to the html/body elements and acts as the base
+ * for rem calculations.
+ *
+ * @memberof Content:base-font-size-value
+ * @function
+ * @name base-font-size-value
+ * @alias base-font-size-value
+ *
+ * @returns {Number} the currently set jig base font size value
+ *
+ * @example
+ * font-size: base-font-size-value();
+ */
+@function base-font-size-value(){
+ @return $jig---base-font-size;
+}
diff --git a/source/scss/jig/_index.scss b/source/scss/jig/_index.scss
index 9f4b5e2..30aab18 100644
--- a/source/scss/jig/_index.scss
+++ b/source/scss/jig/_index.scss
@@ -5,4 +5,5 @@
@forward 'util';
@forward 'breakpoints';
@forward 'grid';
+@forward 'content';
@forward 'spacing';
diff --git a/source/scss/jig/content.scss b/source/scss/jig/content.scss
new file mode 100644
index 0000000..d78da2c
--- /dev/null
+++ b/source/scss/jig/content.scss
@@ -0,0 +1,176 @@
+/**
+ * @namespace Content
+ */
+
+
+
+@use 'sass:meta';
+@use 'sass:map';
+@use 'sass:list';
+
+@use 'globals' as *;
+@use 'breakpoints';
+
+
+
+/**
+ * @namespace Content:content-holder
+ */
+
+/**
+ * Adds properties to the current element, which make it a "content holder", meaning, that it
+ * adheres to the defined min/max content widths and keeps the content away from the browser edges by
+ * defining margins according to the defined responsive content paddings.
+ *
+ * Min and max widths are only rendered if they are defined in the jig config, as are content paddings.
+ *
+ * A content holder can be used as the base container definition for non-breakout elements on a page,
+ * which is not supposed to grow indefinitely horizontally.
+ *
+ * A content holder can be a grid container at the same time, these things do not exclude themselves and
+ * are even a very common use case.
+ *
+ * @memberof Content:content-holder
+ * @function
+ * @name content-holder
+ * @alias content-holder
+ *
+ * @param {Boolean} [$padded=true] - if true, config-defined responsive content padding gets applied to the element
+ * @param {Boolean} [$centered=true] - if true, element gets auto-centered using auto margins
+ *
+ * @example
+ * \@include content-holder();
+ */
+@mixin content-holder($padded:true, $centered:false){
+ $breakpoint-names: map.keys($jig---breakpoint-config);
+ $smallest-breakpoint: list.nth($breakpoint-names, 1);
+ $largest-breakpoint: list.nth($breakpoint-names, -1);
+
+ $min-width: content-width-value('min');
+ $max-width: content-width-value('max');
+
+ @if $min-width != null {
+ min-width: $min-width + (2 * content-padding-value($smallest-breakpoint));
+ }
+ @if $max-width != null {
+ max-width: $max-width + (2 * content-padding-value($largest-breakpoint));
+ }
+
+ @if $centered {
+ margin-right: auto;
+ margin-left: auto;
+ }
+
+ @if $padded {
+ $content-padding: map.get($jig---content-config, 'padding');
+
+ @if $content-padding != null {
+ @include breakpoints.attributes-for-breakpoints((
+ 'padding-left' : $content-padding,
+ 'padding-right' : $content-padding,
+ ));
+ }
+ }
+}
+
+
+
+/**
+ * @namespace Content:content-padding-value
+ */
+
+/**
+ * Returns the defined content padding for a/the current breakpoint.
+ *
+ * @memberof Content:content-padding-value
+ * @function
+ * @name content-padding-value
+ * @alias content-padding-value
+ *
+ * @param {String} [$breakpoint='auto'] - a defined breakpoint name or "auto", to use the current breakpoint at the point of usage
+ * @returns {Number} the determined content padding value
+ * @throws error if no content padding value could be determined, based on given breakpoint
+ *
+ * @example
+ * \@include breakpoint(medium){
+ * padding-left: content-padding-value();
+ * }
+ * margin-right: content-padding-value($breakpoint:'small');
+ */
+@function content-padding-value($breakpoint:'auto'){
+ $padding: map.get($jig---content-config, 'padding');
+ $res: null;
+
+ @if $padding != null {
+ @if meta.type-of($padding) == 'map' {
+ $res: breakpoints.breakpoint-value($padding, $breakpoint);
+ } @else {
+ $res: $padding;
+ }
+ }
+
+ @if $res == null {
+ @error 'jig:content-padding-value | could not resolve content padding, check breakpoint';
+ }
+
+ @return $res;
+}
+
+
+
+/**
+ * @namespace Content:content-width-value
+ */
+
+/**
+ * Returns the defined min/max content width.
+ *
+ * @memberof Content:content-width-value
+ * @function
+ * @name content-width-value
+ * @alias content-width-value
+ *
+ * @param {String} [$min-max='max'] - either "min" or "max", defines if min or max content-width is returned
+ * @param {?Number} [$default=null] - the default value to return if the width definition cannot be found
+ * @returns {Number|null} the determined content width value, may be null if width is not defined (depending on default value)
+ *
+ * @example
+ * max-width: content-width-value();
+ * min-width: content-width-value('min', 0);
+ */
+@function content-width-value($min-max:'max', $default:null){
+ $width: map.get($jig---content-config, 'max-width');
+ @if $min-max == 'min' {
+ $width: map.get($jig---content-config, 'min-width');
+ }
+
+ @if $width == null {
+ $width: $default;
+ }
+
+ @return $width;
+}
+
+
+
+/**
+ * @namespace Content:base-font-size-value
+ */
+
+/**
+ * Returns the base font size, which is most likely applied to the html/body elements and acts as the base
+ * for rem calculations.
+ *
+ * @memberof Content:base-font-size-value
+ * @function
+ * @name base-font-size-value
+ * @alias base-font-size-value
+ *
+ * @returns {Number} the currently set jig base font size value
+ *
+ * @example
+ * font-size: base-font-size-value();
+ */
+@function base-font-size-value(){
+ @return $jig---base-font-size;
+}
diff --git a/source/stylus/jig/content.styl b/source/stylus/jig/content.styl
new file mode 100644
index 0000000..fa199cb
--- /dev/null
+++ b/source/stylus/jig/content.styl
@@ -0,0 +1,153 @@
+/**
+ * @namespace Content
+ */
+
+
+
+/**
+ * @namespace Content:content-holder
+ */
+
+/**
+ * Adds properties to the current element, which make it a "content holder", meaning, that it
+ * adheres to the defined min/max content widths and keeps the content away from the browser edges by
+ * defining margins according to the defined responsive content paddings.
+ *
+ * Min and max widths are only rendered if they are defined in the jig config, as are content paddings.
+ *
+ * A content holder can be used as the base container definition for non-breakout elements on a page,
+ * which is not supposed to grow indefinitely horizontally.
+ *
+ * A content holder can be a grid container at the same time, these things do not exclude themselves and
+ * are even a very common use case.
+ *
+ * @memberof Content:content-holder
+ * @function
+ * @name content-holder
+ * @alias content-holder
+ *
+ * @param {Boolean} [$padded=true] - if true, config-defined responsive content padding gets applied to the element
+ * @param {Boolean} [$centered=true] - if true, element gets auto-centered using auto margins
+ *
+ * @example
+ * content-holder()
+ */
+content-holder($padded=true, $centered=false)
+ $breakpoint-names = keys($jig---breakpoint-config)
+ $smallest-breakpoint = $breakpoint-names[0]
+ $largest-breakpoint = last($breakpoint-names)
+
+ $min-width = content-width-value('min')
+ $max-width = content-width-value('max')
+
+ if $min-width != null
+ min-width ($min-width + (2 * content-padding-value($smallest-breakpoint)))
+
+ if $max-width != null
+ max-width ($max-width + (2 * content-padding-value($largest-breakpoint)))
+
+ if $centered
+ margin-right auto
+ margin-left auto
+
+ if $padded
+ $content-padding = $jig---content-config.padding
+
+ if $content-padding != null
+ attributes-for-breakpoints({
+ 'padding-left' : $content-padding,
+ 'padding-right' : $content-padding,
+ })
+
+
+
+/**
+ * @namespace Content:content-padding-value
+ */
+
+/**
+ * Returns the defined content padding for a/the current breakpoint.
+ *
+ * @memberof Content:content-padding-value
+ * @function
+ * @name content-padding-value
+ * @alias content-padding-value
+ *
+ * @param {String} [$breakpoint='auto'] - a defined breakpoint name or "auto", to use the current breakpoint at the point of usage
+ * @returns {Number} the determined content padding value
+ * @throws error if no content padding value could be determined, based on given breakpoint
+ *
+ * @example
+ * breakpoint(medium)
+ * padding-left content-padding-value()
+ * margin-right content-padding-value($breakpoint:'small')
+ */
+content-padding-value($breakpoint='auto')
+ $padding = $jig---content-config.padding
+ $res = null
+
+ if $padding != null
+ if type($padding) == 'object'
+ $res = breakpoint-value($padding, $breakpoint)
+ else
+ $res = $padding
+
+ if $res == null
+ error('jig:content-padding-value | could not resolve content padding, check breakpoint')
+
+ return $res
+
+
+
+/**
+ * @namespace Content:content-width-value
+ */
+
+/**
+ * Returns the defined min/max content width.
+ *
+ * @memberof Content:content-width-value
+ * @function
+ * @name content-width-value
+ * @alias content-width-value
+ *
+ * @param {String} [$min-max='max'] - either "min" or "max", defines if min or max content-width is returned
+ * @param {?Number} [$default=null] - the default value to return if the width definition cannot be found
+ * @returns {Number|null} the determined content width value, may be null if width is not defined (depending on default value)
+ *
+ * @example
+ * max-width content-width-value()
+ * min-width content-width-value('min', 0)
+ */
+content-width-value($min-max='max', $default=null)
+ $width = $jig---content-config.max-width
+ if $min-max == 'min'
+ $width = $jig---content-config.min-width
+
+ if $width == null
+ $width = $default
+
+ return $width
+
+
+
+/**
+ * @namespace Content:base-font-size-value
+ */
+
+/**
+ * Returns the base font size, which is most likely applied to the html/body elements and acts as the base
+ * for rem calculations.
+ *
+ * @memberof Content:base-font-size-value
+ * @function
+ * @name base-font-size-value
+ * @alias base-font-size-value
+ *
+ * @returns {Number} the currently set jig base font size value
+ *
+ * @example
+ * font-size base-font-size-value()
+ */
+base-font-size-value()
+ return $jig---base-font-size
diff --git a/source/stylus/jig/index.styl b/source/stylus/jig/index.styl
index da68548..6670a2a 100644
--- a/source/stylus/jig/index.styl
+++ b/source/stylus/jig/index.styl
@@ -2,4 +2,5 @@
@require 'util'
@require 'breakpoints'
@require 'grid'
+@require 'content'
@require 'spacing'
diff --git a/yarn.lock b/yarn.lock
index f996e48..abfe86a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.1.0.tgz#417fef4a143f4396ad0b3b4351fee21323f15aa8"
integrity sha512-mMVJ/j/GbZ/De4ZHWbQAQO1J6iVnjtZLc9WEdkUQb8S/Bu2cAF2bETXUgMAdvMG3/ngtKmcNBe+Zms9bg6jnQQ==
-"@adobe/css-tools@~4.3.1":
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.1.tgz#abfccb8ca78075a2b6187345c26243c1a0842f28"
- integrity sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==
+"@adobe/css-tools@~4.3.3":
+ version "4.3.3"
+ resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.3.tgz#90749bde8b89cd41764224f5aac29cd4138f75ff"
+ integrity sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==
"@babel/code-frame@^7.0.0":
version "7.18.6"
@@ -3608,10 +3608,10 @@ sass-graph@^4.0.1:
scss-tokenizer "^0.4.3"
yargs "^17.2.1"
-sass@~1.66.1:
- version "1.66.1"
- resolved "https://registry.yarnpkg.com/sass/-/sass-1.66.1.tgz#04b51c4671e4650aa393740e66a4e58b44d055b1"
- integrity sha512-50c+zTsZOJVgFfTgwwEzkjA3/QACgdNsKueWPyAR0mRINIvLAStVQBbPg14iuqEQ74NPDbXzJARJ/O4SI1zftA==
+sass@~1.77.5:
+ version "1.77.5"
+ resolved "https://registry.yarnpkg.com/sass/-/sass-1.77.5.tgz#5f9009820297521356e962c0bed13ee36710edfe"
+ integrity sha512-oDfX1mukIlxacPdQqNb6mV2tVCrnE+P3nVYioy72V5tlk56CPNcO4TCuFcaCRKKfJ1M3lH95CleRS+dVKL2qMg==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"
@@ -4064,12 +4064,12 @@ stylus@^0.59.0:
sax "~1.2.4"
source-map "^0.7.3"
-stylus@~0.62.0:
- version "0.62.0"
- resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.62.0.tgz#648a020e2bf90ed87587ab9c2f012757e977bb5d"
- integrity sha512-v3YCf31atbwJQIMtPNX8hcQ+okD4NQaTuKGUWfII8eaqn+3otrbttGL1zSMZAAtiPsBztQnujVBugg/cXFUpyg==
+stylus@~0.63.0:
+ version "0.63.0"
+ resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.63.0.tgz#511e8d56f2005b09010fbc1f62561c7b6f72a490"
+ integrity sha512-OMlgrTCPzE/ibtRMoeLVhOY0RcNuNWh0rhAVqeKnk/QwcuUKQbnqhZ1kg2vzD8VU/6h3FoPTq4RJPHgLBvX6Bw==
dependencies:
- "@adobe/css-tools" "~4.3.1"
+ "@adobe/css-tools" "~4.3.3"
debug "^4.3.2"
glob "^7.1.6"
sax "~1.3.0"