Heydon/fukol-grids

In a percentage based fukol grid the margin in calc() should be double

nickrttn opened this issue · 3 comments

Instead of this:

.fukol-grid > *:first-child {
  flex-basis: calc(100% - 1em);
}

It should be this:

.fukol-grid > *:first-child {
  flex-basis: calc(100% - 2em);
}

to account for the margin on both the left and the right side.

@nickrttn 1em appears to work, but I can't remember why 🤔

See https://codepen.io/heydon/pen/dpzwVd

Because it actually is double the margin you specified in the fukol grid. There is no bug. I should have copy-pasted instead of typing it myself :)

@nickrttn Oh! No problem. Thanks for checking up anyway. Hope you have some fun with it.