[wp-trac] [WordPress Trac] #63143: Twenty Nineteen: Inconsistent spacing between Table Caption and Table in Table Block
WordPress Trac
noreply at wordpress.org
Tue Mar 25 21:15:24 UTC 2025
#63143: Twenty Nineteen: Inconsistent spacing between Table Caption and Table in
Table Block
----------------------------------------+------------------------------
Reporter: sainathpoojary | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 5.4
Severity: minor | Resolution:
Keywords: has-patch has-testing-info | Focuses: css
----------------------------------------+------------------------------
Changes (by sabernhardt):
* focuses: => css
* version: 3.0 => 5.4
Comment:
> normalizing the base size to 22px in the editor
I do not recommend changing the base size on the `html` element. The
theme's styles need to work even when the editor is not in an iframe.
Also, calculations involving `$size__spacing-unit` in `style-editor.scss`
seem to be based on 16.
The theme gave `table` elements a bottom margin on the front without
defining the same margin in the editor. Of course, with WordPress 5.0's
editor, the margin was unnecessary. The `figcaption` was not available
until 5.4.
At least WordPress 5.3 would have an issue with the proposed margin on
`.wp-block-table table`, but that is quite minor and the situation should
be rare. The selector below would add a margin to tables that have a later
sibling element, regardless of whether it is inside a Table block, but
that could be over-complicated.
{{{
:where(.editor-styles-wrapper table:not(:last-child)) {
margin-bottom: 1.375rem;
}
}}}
Also, the measurement theoretically could be `1em` in the editor, which
would be accurate for the default font size. However, if the table's font
size is customized, it would be slightly off `1rem` on the front.
The patch will need to edit `style-editor.scss` in addition to `style-
editor.css`, and the spacing is different in each (indent with tab in
SCSS, or two spaces in CSS).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63143#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list