Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery block: add ability to set gutter #33582

Closed
glendaviesnz opened this issue Jul 20, 2021 · 4 comments
Closed

Gallery block: add ability to set gutter #33582

glendaviesnz opened this issue Jul 20, 2021 · 4 comments
Assignees
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images

Comments

@glendaviesnz
Copy link
Contributor

Once the gallery refactor is merged it would be good to add an option to allow the setting of the gutter between images to allow the gape between images to be expanded or removed.

@paaljoachim
Copy link
Contributor

If I remember correctly I believe @aaronrobertshaw is working on the general gutter control which when merged can be added to multiple blocks. I came across a few issues when I searched for the word gutter here on the Gutenberg repo.

@aaronrobertshaw
Copy link
Contributor

Thanks for the ping @paaljoachim.

We did originally have a feature in the refactored gallery to control gutter size however it was requested that be moved to a future PR. I also had a PR to control gutters for columns via margin block support however that relied on CSS variables which were deemed to be undesirable.

Since then a promising new PR adding grid gap block support has been created by @andrewserong. That might be the best bet to adding control over gallery gutters in the near future.

@dashkevych
Copy link

It would be great if such functionality was added to the Gallery block. In that case, we would be able to eliminate unnecessary space at the bottom of the gallery block. Also, it would simplify CSS of the Gallery block (no longer need to use width: calc(25% - 0.75em); and. margin-right: 1em;).

Each item in gallery adds side and bottom margins:

Singular gallery item

As a result it creates additional space at the bottom of the Gallery block:

Gallery block

Also, setting a default gap value for the Gallery block in theme.json would be very useful.

@glendaviesnz
Copy link
Contributor Author

Done in #38164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants