Skip to content

Commit e954e05

Browse files
committed
🔨 Addeda couple of helper classes
Added helper classes for columns to share the left over width
1 parent aef2b51 commit e954e05

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

dist/waffle-grid.css

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* waffle-grid - v1.3.0 - (https://lucasgruwez.github.io/waffle-grid)
2+
* waffle-grid - v1.3.1 - (https://lucasgruwez.github.io/waffle-grid)
33
* Copyright 2017 Lucas Gruwez.
44
* Licensed under MIT
55
* https://lucasgruwez.github.io/waffle-grid
@@ -38,6 +38,11 @@
3838
margin-left: auto;
3939
}
4040

41+
.w-auto {
42+
-ms-flex: 1;
43+
flex: 1;
44+
}
45+
4146
.col-1-of-4,.col-2-of-8,.col-3-of-12 {
4247
width: calc(25% - 20px);
4348
}
@@ -235,6 +240,11 @@
235240
display: none;
236241
}
237242

243+
.w-m-auto {
244+
-ms-flex: 1;
245+
flex: 1;
246+
}
247+
238248
.col-m-1-of-4,.col-m-2-of-8 {
239249
width: calc(25% - 20px);
240250
}
@@ -385,6 +395,11 @@
385395
display: none;
386396
}
387397

398+
.w-s-auto {
399+
-ms-flex: 1;
400+
flex: 1;
401+
}
402+
388403
.col-s-1-of-4 {
389404
width: calc(25% - 20px);
390405
}
@@ -483,13 +498,13 @@
483498
}
484499

485500
@media (min-width:480px) {
486-
.s-and-lower,.s-only {
501+
.s-and-lower {
487502
display: none;
488503
}
489504
}
490505

491506
@media (min-width:840px) {
492-
.m-and-lower,.m-only {
507+
.m-and-lower {
493508
display: none;
494509
}
495510
}

dist/waffle-grid.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ gulp.task('css:minify', function() {
3737
.pipe(gulp.dest('dist'));
3838
});
3939

40+
gulp.task('watch', function () {
41+
gulp.watch('./src/**/*.scss', function () {
42+
runSequence('sass:compile', 'css:minify')
43+
});
44+
});
45+
4046
gulp.task('default', function () {
4147
runSequence('sass:compile', 'css:minify');
4248
})

src/waffle-grid.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* waffle-grid - v1.3.0 - (https://lucasgruwez.github.io/waffle-grid)
2+
* waffle-grid - v1.3.1 - (https://lucasgruwez.github.io/waffle-grid)
33
* Copyright 2017 Lucas Gruwez.
44
* Licensed under MIT
55
* https://lucasgruwez.github.io/waffle-grid
@@ -60,6 +60,7 @@ $breakpoints: (
6060
.center {margin-left: auto; margin-right: auto;}
6161
.left {margin-right: auto;}
6262
.right {margin-left: auto;}
63+
.w-auto {flex: 1}
6364

6465
@each $col-am in $grid-columns {
6566
@for $i from 1 through $col-am {
@@ -89,6 +90,7 @@ $breakpoints: (
8990

9091
@media (max-width: $bp-width) {
9192
.#{$bp-name}-hide {display: none;}
93+
.w-#{$bp-name}-auto {flex: 1}
9294

9395
@each $col-am in $bp-col-ams {
9496
@for $i from 1 through $col-am {
@@ -134,7 +136,6 @@ $breakpoints: (
134136
$bp-width: nth(nth($bp, 2), 1);
135137

136138
@media (min-width: $bp-width) {
137-
.#{$bp-name}-only {display: none;}
138139
.#{$bp-name}-and-lower {display: none;}
139140
}
140141
}
@@ -145,5 +146,4 @@ $breakpoints: (
145146

146147

147148

148-
149149
// under 150 lines !!

0 commit comments

Comments
 (0)