Skip to content

Commit bc7b8b5

Browse files
author
Cory Simmons
committed
Stop outputting padding on center if none
1 parent 5d32a1f commit bc7b8b5

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

less/lost.less

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Lost Grid v5.1.3 - https://github.com/corysimmons/lost
1+
// Lost Grid v5.1.4 - https://github.com/corysimmons/lost
22

33
@gutter: 30px;
44
@rtl: false;
@@ -94,9 +94,11 @@
9494
& when (@flex = true) {
9595
.flex-container();
9696
}
97+
& when not (@pad = 0) {
98+
padding-left: @pad;
99+
padding-right: @pad;
100+
}
97101
max-width: @max-size;
98-
padding-left: @pad;
99-
padding-right: @pad;
100102
margin-left: auto;
101103
margin-right: auto;
102104
}

scss/lost.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Lost Grid v5.1.3 - https://github.com/corysimmons/lost
1+
// Lost Grid v5.1.4 - https://github.com/corysimmons/lost
22

33
$gutter: 30px !default;
44
$rtl: false !default;
@@ -85,9 +85,11 @@ $flexbox: false !default;
8585
} @else {
8686
@include flex-container;
8787
}
88+
@if ($pad != 0) {
89+
padding-left: $pad;
90+
padding-right: $pad;
91+
}
8892
max-width: $max-size;
89-
padding-left: $pad;
90-
padding-right: $pad;
9193
margin-left: auto;
9294
margin-right: auto;
9395
}

stylus/lost.styl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Lost Grid v5.1.3 - https://github.com/corysimmons/lost
1+
// Lost Grid v5.1.4 - https://github.com/corysimmons/lost
22

33
$gutter = 30px
44
$rtl = false
@@ -78,9 +78,10 @@ center($max-size = 1140px, $pad = 0, $flex = $flexbox)
7878
clearfix()
7979
else
8080
flex-container()
81+
if $pad is not 0
82+
padding-left: $pad
83+
padding-right: $pad
8184
max-width: $max-size
82-
padding-left: $pad
83-
padding-right: $pad
8485
margin-left: auto
8586
margin-right: auto
8687

0 commit comments

Comments
 (0)