Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
fix(bleed): Negative margins interpolated incorrectly for decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
seejamescode committed Feb 28, 2018
1 parent 1092aa1 commit 17d3cc2
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 25 deletions.
Binary file modified examples/bootstrap/css-gridish/bootstrap-grid.sketch
Binary file not shown.
12 changes: 6 additions & 6 deletions examples/bootstrap/css-gridish/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
padding-left: calc(#{$maxBleed} * -1 + #{$margin});
padding-right: calc(#{$maxBleed} * -1 + #{$margin});
} @else {
margin-left: -$margin;
margin-right: -$margin;
margin-left: -#{$margin};
margin-right: -#{$margin};
padding-left: $margin;
padding-right: $margin;
}
Expand All @@ -222,21 +222,21 @@

.#{$prefix}-grid--bleed--left {
padding-left: $margin;
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid--bleed--right {
padding-right: $margin;
margin-right: -$margin;
margin-right: -#{$margin};
}

@include gridLegacyWrapper($includeFlexFallback) {
.#{$prefix}-grid__break--left {
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid__break--right {
margin-right: -$margin;
margin-right: -#{$margin};
}
}
}
Expand Down
Binary file modified examples/carbon/css-gridish/bx-grid.sketch
Binary file not shown.
12 changes: 6 additions & 6 deletions examples/carbon/css-gridish/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
padding-left: calc(#{$maxBleed} * -1 + #{$margin});
padding-right: calc(#{$maxBleed} * -1 + #{$margin});
} @else {
margin-left: -$margin;
margin-right: -$margin;
margin-left: -#{$margin};
margin-right: -#{$margin};
padding-left: $margin;
padding-right: $margin;
}
Expand All @@ -222,21 +222,21 @@

.#{$prefix}-grid--bleed--left {
padding-left: $margin;
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid--bleed--right {
padding-right: $margin;
margin-right: -$margin;
margin-right: -#{$margin};
}

@include gridLegacyWrapper($includeFlexFallback) {
.#{$prefix}-grid__break--left {
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid__break--right {
margin-right: -$margin;
margin-right: -#{$margin};
}
}
}
Expand Down
Binary file modified examples/material/css-gridish/material-grid.sketch
Binary file not shown.
12 changes: 6 additions & 6 deletions examples/material/css-gridish/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
padding-left: calc(#{$maxBleed} * -1 + #{$margin});
padding-right: calc(#{$maxBleed} * -1 + #{$margin});
} @else {
margin-left: -$margin;
margin-right: -$margin;
margin-left: -#{$margin};
margin-right: -#{$margin};
padding-left: $margin;
padding-right: $margin;
}
Expand All @@ -222,21 +222,21 @@

.#{$prefix}-grid--bleed--left {
padding-left: $margin;
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid--bleed--right {
padding-right: $margin;
margin-right: -$margin;
margin-right: -#{$margin};
}

@include gridLegacyWrapper($includeFlexFallback) {
.#{$prefix}-grid__break--left {
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid__break--right {
margin-right: -$margin;
margin-right: -#{$margin};
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ gulp.task("build", function() {
return run("npm run build").exec();
});

gulp.task("build:examples", function() {
return run("npm run build:examples").exec();
});

gulp.task("refresh", ["build"], function(done) {
browserSync.reload();
done();
});

gulp.task("refresh:examples", ["build:examples"], function(done) {
browserSync.reload();
done();
});

gulp.task("watch", function() {
browserSync.init({
server: {
Expand All @@ -22,4 +31,5 @@ gulp.task("watch", function() {

gulp.watch(["**/*.html"]).on("change", browserSync.reload);
gulp.watch("src/**/*", ["refresh"]);
gulp.watch("examples/**/*.json", ["refresh:examples"]);
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css-gridish",
"version": "1.0.5",
"version": "1.0.6",
"description":
"Automatically build your grid design’s CSS Grid code, CSS Flexbox fallback code, Sketch artboards, and Chrome extension.",
"engines": {
Expand Down
12 changes: 6 additions & 6 deletions src/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@
padding-left: calc(#{$maxBleed} * -1 + #{$margin});
padding-right: calc(#{$maxBleed} * -1 + #{$margin});
} @else {
margin-left: -$margin;
margin-right: -$margin;
margin-left: -#{$margin};
margin-right: -#{$margin};
padding-left: $margin;
padding-right: $margin;
}
Expand All @@ -222,21 +222,21 @@

.#{$prefix}-grid--bleed--left {
padding-left: $margin;
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid--bleed--right {
padding-right: $margin;
margin-right: -$margin;
margin-right: -#{$margin};
}

@include gridLegacyWrapper($includeFlexFallback) {
.#{$prefix}-grid__break--left {
margin-left: -$margin;
margin-left: -#{$margin};
}

.#{$prefix}-grid__break--right {
margin-right: -$margin;
margin-right: -#{$margin};
}
}
}
Expand Down

0 comments on commit 17d3cc2

Please sign in to comment.