Skip to content

Commit

Permalink
Implement Responsive margin for the X property. Fixes #41
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmd committed Mar 4, 2019
1 parent 38e4972 commit b080bcd
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Adjust the margin between columns with a pixel value. Don’t forget you can sti

Added in v2.1 you can now have an object for margin. This is optional you can set the margin property to just a number and macy will use it for both. But if you would like to add a different xMargin or yMargin then you can do so like this

Added in v2.4 you can now set the x property to be a percentage based value, in addition to this, the x property can use other unit types.

**Note:** Due to the way the container height is calculated, using anything other than integer in the Y property will cause an error.

```
margin: {
x: 10,
Expand Down
5 changes: 4 additions & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ <h1 class="hero__title">Macy.js is a lightweight, dependency free, 2kb (gzipped)
debug: true,
mobileFirst: true,
columns: 1,
margin: 24,
margin: {
y: 16,
x: '2%',
},
breakAt: {
1200: 6,
940: 5,
Expand Down
Loading

0 comments on commit b080bcd

Please sign in to comment.