[wp-trac] [WordPress Trac] #46262: Twenty Nineteen: odd content_width in theme
WordPress Trac
noreply at wordpress.org
Mon Apr 22 17:10:33 UTC 2024
#46262: Twenty Nineteen: odd content_width in theme
-------------------------------------+-----------------------------
Reporter: nosilver4u | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Bundled Theme | Version: 5.0
Severity: normal | Resolution:
Keywords: needs-patch 2nd-opinion | Focuses:
-------------------------------------+-----------------------------
Changes (by sabernhardt):
* keywords: => needs-patch 2nd-opinion
* version: 5.0.3 => 5.0
Comment:
Numbers in the description reflect a viewport width of (around) 1920
pixels. Twenty Nineteen's //design// does not have a maximum content
width, so images (that line up with paragraphs) can be even wider than 932
pixels.
- viewports up to 767px can show images as wide as 723 pixels (`.entry-
content` has `max-width:100%-2rem`, image has `max-width:100%`)
- viewports from 768px to 1167px show images up to 750 pixels wide
(`.entry-content` `max-width:80%`, image `max-width:66.7vw-28px`)
- viewports 1168px and wider can show images from 556 pixels wide to much
larger (`.entry-content` has `max-width:80%`, image has `max-width:50vw-
28px`)
Twenty Nineteen's `$content_width` variable was set to 640 at the theme's
[https://github.com/WordPress/twentynineteen/blob/be850d11ee31434ad700db518ff8570f82e65b9c/functions.php#L99-L112
initial commit], and that
[https://github.com/Automattic/_s/blob/54ad32a5980d01275d2c63b4fa4ba8ce6a8b726f/functions.php#L86-L99
matches the value Underscores had] at the same time. For comparison,
[https://github.com/WordPress/twentytwentyone/blob/956a3172a41545ca04a133c034b47ae870a4a9cd/functions.php#L251-L264
Twenty Twenty-One started with 750], which matched
[https://github.com/Automattic/themes/blob/66fe602d0ced6aecbab6fadbc9be826c14044910/seedlet/functions.php#L326-L339
Seedlet's initial width] but later
[https://github.com/Automattic/themes/pull/2535/files#diff-
99f91cbce76d9c104fb9b36a8a95e43e62f0839ac8044d68b7815de49f89fa9bR357
Seedlet reduced it to 620].
Seedlet's change suggests that editing the value for Twenty Nineteen is
feasible, though I am not eager to change it after five years. The theme
has had the `twentynineteen_content_width` filter, and at least EWWW has a
filter too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46262#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list