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 not centered in many themes due to margin/padding on UL #5890

Closed
2 tasks
dreamwhisper opened this issue Mar 29, 2018 · 1 comment
Closed
2 tasks
Assignees
Labels
[Status] In Progress Tracking issues with work in progress

Comments

@dreamwhisper
Copy link

dreamwhisper commented Mar 29, 2018

Issue Overview

ULs were used for gallery markup in #3441. However, many themes style lists within the content and add padding or margin to the left side. Thus, galleries appear shifted to the side/uncentered.

Steps to Reproduce (for bugs)

  1. Insert a gallery block
  2. Activate a theme that adds margin and/or padding to content ULs (Twenty Fourteen is an example with alignnone selected for the block.)
  3. Note galleries will be shifted to the side.

gallery

Expected Behavior

Galleries would not be shifted by CSS intended for text-based lists.

Current Behavior

Margin and/or padding is adopted from text-based list styling and galleries are unintentionally shifted.

Possible Solution

Reset left/right margin/padding for:

.wp-block-gallery,
.wp-block-gallery.aligncenter,
.wp-block-gallery.alignleft,
.wp-block-gallery.alignnone,
.wp-block-gallery.alignright 

Screenshots / Video

Related Issues and/or PRs

#3441

Todos

  • Tests
  • Documentation
@dreamwhisper dreamwhisper changed the title Gallery not centered in many themes to to margin on UL Gallery not centered in many themes due to margin/padding on UL Mar 29, 2018
@ErikXXon
Copy link

I also get this problem in my theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

No branches or pull requests

3 participants