[wp-trac] [WordPress Trac] #49601: layout width bugfix for img_caption_shortcode()
WordPress Trac
noreply at wordpress.org
Sun Mar 8 21:14:13 UTC 2020
#49601: layout width bugfix for img_caption_shortcode()
------------------------------------+-----------------------
Reporter: joelhardi | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+-----------------------
Comment (by smerriman):
Replying to [comment:2 joelhardi]:
> BUT ... I think it's a bad behavior for WordPress to break mobile
layouts by default. Especially now that Google has gone to mobile-first
crawling and this will get flagged as an issue.
It's the responsibility of the theme to ensure images work on mobile - if
your theme didn't have the line:
`img {max-width:100%;}`
it would also break.
Just use:
`img, .wp-caption {max-width:100%;}`
and there are no issues. This is what all themes do, so I see no need to
change some fundamental logic in core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49601#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list