The gallery paragraph has an unnecessary margin

Created on 14 April 2025, 25 days ago

Problem/Motivation

If no title is added, there's an extra margin that causes the content not to be vertically centered.

Steps to reproduce

  1. Add a gallery paragraph.
  2. Add some photos to the gallery.
  3. Don't fill anything else.
  4. SAVE

Now you can see that the gallery is not vertically centered.

🐛 Bug report
Status

Active

Version

5.0

Component

Miscellaneous

Created by

🇵🇱Poland dinerrr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dinerrr
  • 🇮🇳India Tirupati_Singh

    I'm look into this.

  • Pipeline finished with Success
    11 days ago
    #483721
  • 🇮🇳India Tirupati_Singh

    Hi @dinerrr, I was able to replicate the issue. The extra spacing at the top was appearing due to the margin-top set at the class "d-p-gallery__items". The intention was to add some spacing between the "Main title" or "Gallery description" field added in the Gallery component; however, the margin was still added if the component does not have content in the fields "Main title" or "Gallery description".

    I've fixed the spacing issue. Now, the "d-p-gallery__items" will have a margin at the top only when the component has content in the fields "Main title" or "Gallery description," and no margin at the top when there is no "Main title" or "Gallery description" added in the component. I'm attaching screenshots of the before and after fixes for the issue for reference. Please review the MR changes.

    Thanks!

Production build 0.71.5 2024