core/table keeps core's .5em cell padding where the source table relies on the UA default 1px
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start with TableAttributesBuilder, where the issue says converted tables already neutralize core's default cell borders, and trace how cell padding and author styles are emitted. Add a test for the reduced table fixture plus the td{padding:8px} and cellpadding="4" cases; done means the default emits 1px under the table marker while both author values remain in effect.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #6861 (merged as #6933, which handles the explicit cellpadding attribute).
Problem
A source table with no cellpadding and no author padding on its cells gets the user-agent default cell padding of 1px. After conversion to core/table, core's .wp-block-table td, .wp-block-table th { padding: .5em } applies instead, at 7px for 14px text. Every row grows by about 12px.
Blocks Engine already neutralizes core's default cell borders for converted tables ("Core supplies borders on every cell. Clear them…" in TableAttributesBuilder). It does not do the same for core's default padding.
Real case: physics.uci.edu /committees/, a roster table of about 60 rows.
| Cell padding | Row height | Page height | |
|---|---|---|---|
| Source | 1px |
27px | 2227px |
| WordPress | 7px |
39px | 3017px (1.35×) |
The same pattern affects other Drupal WYSIWYG tables on the site, such as the seminars listings and the homepage at 390px.
Reduced repro (trunk 925eabd2b4b)
<table cellspacing="0" style="border-collapse:collapse;width:600px"><tbody><tr><td style="height:16pt">Department Chair</td><td style="height:16pt">Kaplinghat</td></tr><tr><td style="height:16pt">Vice Chair</td><td style="height:16pt">Rajaraman</td></tr></tbody></table>
- Output: no padding rule at all for the table's cells, so core's
.5emwins. - Source: computed
tdpadding is1px.
Expected
- Default rule: when no author CSS or inline style declares padding for the cells, and there's no
cellpadding, the converted table's cells get the UA default (padding:1px) under the existing table marker, beating core's.wp-block-table td. - Author padding wins: author cell padding (projected selectors or inline) and
cellpadding(#6933) still take precedence.
Verification
- Add a unit or contract test with the fixture above: the emitted CSS sets
1pxcell padding under the table marker. - Add one test with author
td{padding:8px}that keeps 8px, and one withcellpadding="4"that keeps 4px. - Rendered check: on the physics.uci.edu import,
/committees/rows are about 27px and the page height is within a few percent of the source.
- Lenguaje dominante
- PHP
- Estrellas
- 31
- Forks
- 7
- Merge medio
- 3 h 40 min
- PR fusionados (30 d)
- 813
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Automattic/blocks-engine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4943 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/blocks-engine#4942 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Automattic/blocks-engine#4921 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Automattic/blocks-engine#775 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
Automattic/blocks-engine#7505 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Automattic/blocks-engine
Issues similares
-
OpenRouter errors returned in a 200 body are thrown as a plain AiExceptionPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
freescout-help-desk/freescout#5844 ·
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Перевод устарел
Dificultad 2/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día