[wp-trac] [WordPress Trac] #61059: Root-Level Padding Breaks Layouts on Twenty Twenty-Four Theme
WordPress Trac
noreply at wordpress.org
Tue Apr 23 16:24:17 UTC 2024
#61059: Root-Level Padding Breaks Layouts on Twenty Twenty-Four Theme
---------------------------+-----------------------------
Reporter: script2see | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 6.5
Severity: normal | Keywords: 2nd-opinion
Focuses: css |
---------------------------+-----------------------------
The following root-level padding from the Twenty Twenty-Four theme's
theme.json file breaks page and post layouts and results in unpredictable
shifts in the layouts, depending on browser and viewport size"
{{{
"spacing": {
"blockGap": "1.2rem",
"padding": {
"left": "var(--wp--preset--spacing--50)",
"right": "var(--wp--preset--spacing--50)"
}
}
}}}
When the padding is nulled out, layouts return to normal. I tested the
following and got much more predictable layouts:
{{{
"styles": {
"spacing": {
"padding": {
"left": "0",
"right": "0"
}
}
}
}}}
Traditionally, margins and padding for the body tag have been set to 0, as
per CSS resets such as the following from Eric Meyer:
https://meyerweb.com/eric/tools/css/reset/.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61059>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list