Support » Plugin: Gutenberg » Gutenberg gallery block – stacking on mobile

  • Resolved maryb1

    (@maryb1)


    Hello,

    I’m using a two-column gallery block and would like it to become one column on mobile. I know @mkuhnell has asked this question a while back. The only solutions provided were to used the classic block or to use two regular columns. I’m aware there are also third-party blocks, but I would prefer to use the native gutenberg block.

    I’m sure this can be done with media queries in the css file, but I’m not familiar with flex, so any tips using the classes specific to that block would be helpful.

    Also, is the possibility to control some media queries directly in the blocks planned in future releases?

    Thank you for your time.

Viewing 1 replies (of 1 total)
  • Plugin Author Jorge Costa

    (@jorgefilipecosta)

    Hi @maryb1!

    You can use the following media query to make image stack on mobile:

    @media (max-width: 800px) {
        .wp-block-gallery .blocks-gallery-grid li.blocks-gallery-item {
            width: 100%;
        }
    }

    We have some plans to improve the mobile controls in the future but I’m not sure a stack on mobile option for the gallery is something that is planned at the moment.

    I hope this information is useful, let us know if you have any further questions!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.