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

Twenty Sixteen: Some center-aligned images are not centered on live site #7336

Open
jp-imagines opened this issue Aug 29, 2023 · 14 comments
Open
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Appearance & Themes Features related to the appearance of sites. Groundskeeping Worked on by Dotcom Groundskeeping Images [Pri] Low [Status] Core fix needed This issues is coming from a bundled theme (Twenty Something)) core and is being addressed in trac. [Theme] Twenty Sixteen Triaged [Type] Bug Something isn't working

Comments

@jp-imagines
Copy link

jp-imagines commented Aug 29, 2023

Quick summary

Some images on Twenty Sixteen have a below-post-meta class on either the figure or img element. For some reason, there's a style applying -40% left margin to those, preventing them from ever being centered.

Steps to reproduce

  1. Activate Twenty Sixteen.
  2. Create a post with some images which are set to align center.
  3. View the post on the live site.

What you expected to happen

Images set to align center should be centered.

What actually happened

Some images are not centered:

MGMUxU.png

Browser

No response

Context

6742797-zd-a8c

Platform (Simple, Atomic, or both?)

Simple

Other notes

Only replicated on Simple so far. Tried a few other themes and couldn't replicate there. User reports this started only a few days ago.

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, easy to implement

Workaround details

CSS fix:

body:not(.search-results) article:not(.type-page) figure.aligncenter img.below-entry-meta, body:not(.search-results) article:not(.type-page) figure.below-entry-meta.aligncenter {
    margin-left: 0;
}
@jp-imagines jp-imagines added [Type] Bug Something isn't working Needs triage labels Aug 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2023

Support References

This comment is automatically generated. Please do not edit it.

  • 6742797-zen
  • 6765538-zen
  • 6761812-zen
  • 6798174-zen
  • 6752201-zen
  • 7070495-zen
  • 7082359-zen
  • 7186086-zen
  • 7268524-zen
  • 7539540-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Aug 29, 2023
@cuemarie
Copy link

cuemarie commented Aug 30, 2023

📌 REPRODUCTION RESULTS

  • Tested on Simple – Replicated
  • Tested on Atomic – Replicated
  • Replicable outside of Dotcom – Yes/No

📌 FINDINGS/SCREENSHOTS/VIDEO
Replicated across test sites. I think the .below-entry-meta is applying to images below the post's entry meta data, as shown here:

Screenshot on 2023-08-30 at 11-53-25

This seems like its intentional, to widen the content body below that first section of content in the post... but perhaps it's causing unintended consequences, or not making sense for customers?

Simple

e1qyVx.mov

Self-Hosted

Markup on 2023-08-30 at 11:46:47

📌 ACTIONS

  • Triage complete
  • FYI @Automattic/theam
  • Added to Bug Scrub Planning

@1dr0
Copy link

1dr0 commented Sep 4, 2023

6765538-zd
Shared this CSS fix, which includes the image captions in the snippet.

body:not(.search-results) article:not(.type-page) figure.aligncenter img.below-entry-meta,
body:not(.search-results) article:not(.type-page) figure.below-entry-meta.aligncenter,
body:not(.search-results) article:not(.type-page) .wp-block-image figcaption.below-entry-meta {
    margin-left: 0;
}

@cuemarie cuemarie added the [Feature Group] Appearance & Themes Features related to the appearance of sites. label Sep 6, 2023
@AnjanaV93
Copy link

Another report here: 6761812-ZD

@laragee6
Copy link

6798174-ZD
tested this on my test site as well with the same exact content as the user.

@louinel
Copy link

louinel commented Sep 13, 2023

New case here: 6752201-zen
I noticed the class below-entry-meta that added -40% of margin-left on the img element.

@chiape
Copy link

chiape commented Sep 22, 2023

7070495-zen
one more!

@wiesenhauss
Copy link

7082359-ZD
The CSS fix worked for this site.

@AlexanderSky
Copy link

Isn't this the intended behaviour of the theme? It's the "Overhanging Full-Size Image" feature.
image

@cuemarie
Copy link

cuemarie commented Oct 9, 2023

Isn't this the intended behaviour of the theme? It's the "Overhanging Full-Size Image" feature.

@AlexanderSky Since the theme indicates that overhang is for full-sized images wider than 840px, that implies that smaller-than-840px which are not full-width should not overhang - they should be contained within the same content margins as the rest of the content.

So in this issue, smaller-width images that are not full-width and are center-aligned are overhanging - which I believe is the unexpected behavior.

@laragee6
Copy link

also reported here 7186086-zen

@jp-imagines
Copy link
Author

Another report in 7268524-zd-a8c. Gave some alternate CSS as a fix (as the CSS above seems to just be left-aligning within the content area now).

body:not(.search-results) article:not(.type-page) figure.aligncenter.is-resized img.below-entry-meta,
body:not(.search-results) article:not(.type-page) figure.below-entry-meta.aligncenter.is-resized,
body:not(.search-results) article:not(.type-page) .wp-block-image .is-resized figcaption.wp-element-caption.below-entry-meta {
    margin-left: auto;
    margin-right: auto;
}

@AnjanaV93
Copy link

Another report: 7539540-zen

@gikaragia gikaragia self-assigned this Sep 3, 2024
@gikaragia
Copy link
Contributor

This is an issue with the theme itself. A related issue can be found here: #7962

I raised it to WP core in: https://core.trac.wordpress.org/ticket/61723#comment:8

@gikaragia gikaragia added [Status] Core fix needed This issues is coming from a bundled theme (Twenty Something)) core and is being addressed in trac. Groundskeeping Worked on by Dotcom Groundskeeping [Pri] Low and removed [Pri] Normal labels Sep 3, 2024
@gikaragia gikaragia removed their assignment Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature Group] Appearance & Themes Features related to the appearance of sites. Groundskeeping Worked on by Dotcom Groundskeeping Images [Pri] Low [Status] Core fix needed This issues is coming from a bundled theme (Twenty Something)) core and is being addressed in trac. [Theme] Twenty Sixteen Triaged [Type] Bug Something isn't working
Projects
Development

No branches or pull requests

10 participants