Make WordPress Core

Opened 7 years ago

Closed 2 months ago

#41189 closed defect (bug) (worksforme)

Twenty Seventeen images are possibly not adhering to content_width

Reported by: michaelarestad's profile michaelarestad Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

When I add a few images to Twenty Seventeen at full size, they stretch to fill the column. This is all well and good until someone resizes the main column with CSS. Then the images stretch to fill it. However, this gets a bit funky when someone is using Jetpack. The Jetpack module Photon uses content_width to determine image size (I think). This means, the images are now smaller than the user expects because they are the width of the original column.

I honestly am not sure what the call is here. I don't know that adjusting Twenty Seventeen to cap image width is the right move since it could just as easily mess with people's sites. Thoughts?

Change History (2)

#1 @laurelfulford
6 years ago

Thanks for reporting this, @michaelarestad!

I might be mistaken, but I think this is the expected behaviour with anything that uses $content_width -- I can recreate the same thing with other themes, like Twenty Fifteen & Twenty Sixteen.

Depending how the column width is being changed with CSS, it should also be possible to update the $content_width. If it's being done in the Additional CSS panel in the Customizer, there's a field underneath called Media Width where you can add your own value that will override the theme's $content_width:

https://cldup.com/c4w5Nnesfi-2000x2000.png

Or if the column width is being changed via a child theme, the $content_width could be changed in the child theme.

Would either of these options take care of the issue you're looking at?

#2 @poena
2 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Hi
Since this is the expected behavior and two solutions were suggested, I am closing this ticket as "worksforme".

Note: See TracTickets for help on using tickets.