flexmasonry icon indicating copy to clipboard operation
flexmasonry copied to clipboard

gap parameter?

Open dimskor opened this issue 3 years ago • 10 comments

Is it possible to set gap parameter? I tried adding it with css, but it breaks the grid

dimskor avatar Aug 22 '20 15:08 dimskor

@thedimiks Hi, did you find a solution to this? I'm trying to handle the gaps too (both vertical and horizontal) thanks in advance

tourdefran avatar Mar 15 '21 23:03 tourdefran

I figured just adding padding to the inner div is doing the trick.

mapsteps avatar Mar 24 '21 00:03 mapsteps

@MapSteps, thanks for the answer, not so fancy but if it works...

tourdefran avatar Mar 24 '21 00:03 tourdefran

@MapSteps how did you handle the layout shift with the padding? I need to align the items vertically with my grid.

christianwalter avatar Apr 13 '21 11:04 christianwalter

@christianwalter,

I added 10px of padding to the inner div and the following to the outer wrapper as - in my case - inline styles:

style="margin-left: -10px; width: calc(100% + 20px);"

Hope that helps :)

mapsteps avatar Apr 14 '21 08:04 mapsteps

@MapSteps thx, that didn't work for me... Just made grid variante with adding the padding for with and max-width, quiet similar to your solution but without a negative margin.

christianwalter avatar Apr 14 '21 09:04 christianwalter

Hey @christianwalter,

I just realized that I didn't add that to the outer wrapper but instead to another wrapper that's around the entire gallery. You can actually have a look at what I did here - https://portraitmode.io/.

mapsteps avatar Apr 14 '21 10:04 mapsteps

+1 for this requirement as well. Will be running through some tests on my side to see if I can implement a PR for this similar to @cinkagan's above but without the formatting.

@gilbitron Are you willing to merge if I can PR a working copy ideally with tests?

DIntriglia avatar Jun 20 '22 22:06 DIntriglia

@DIntriglia Sure happy to merge a working PR with tests 👍

gilbitron avatar Jun 21 '22 09:06 gilbitron

Hello, I don't know how to create gaps anymore? I need to have them lined up. Thank you so much

TomasBalbinder avatar Feb 12 '23 16:02 TomasBalbinder