Skip to content

Commit

Permalink
Stop outputting padding on center if none
Browse files Browse the repository at this point in the history
  • Loading branch information
Cory Simmons committed Apr 10, 2015
1 parent 5d32a1f commit bc7b8b5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
8 changes: 5 additions & 3 deletions less/lost.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Lost Grid v5.1.3 - https://github.com/corysimmons/lost
// Lost Grid v5.1.4 - https://github.com/corysimmons/lost

@gutter: 30px;
@rtl: false;
Expand Down Expand Up @@ -94,9 +94,11 @@
& when (@flex = true) {
.flex-container();
}
& when not (@pad = 0) {
padding-left: @pad;
padding-right: @pad;
}
max-width: @max-size;
padding-left: @pad;
padding-right: @pad;
margin-left: auto;
margin-right: auto;
}
Expand Down
8 changes: 5 additions & 3 deletions scss/lost.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Lost Grid v5.1.3 - https://github.com/corysimmons/lost
// Lost Grid v5.1.4 - https://github.com/corysimmons/lost

$gutter: 30px !default;
$rtl: false !default;
Expand Down Expand Up @@ -85,9 +85,11 @@ $flexbox: false !default;
} @else {
@include flex-container;
}
@if ($pad != 0) {
padding-left: $pad;
padding-right: $pad;
}
max-width: $max-size;
padding-left: $pad;
padding-right: $pad;
margin-left: auto;
margin-right: auto;
}
Expand Down
7 changes: 4 additions & 3 deletions stylus/lost.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Lost Grid v5.1.3 - https://github.com/corysimmons/lost
// Lost Grid v5.1.4 - https://github.com/corysimmons/lost

$gutter = 30px
$rtl = false
Expand Down Expand Up @@ -78,9 +78,10 @@ center($max-size = 1140px, $pad = 0, $flex = $flexbox)
clearfix()
else
flex-container()
if $pad is not 0
padding-left: $pad
padding-right: $pad
max-width: $max-size
padding-left: $pad
padding-right: $pad
margin-left: auto
margin-right: auto

Expand Down

0 comments on commit bc7b8b5

Please sign in to comment.