Dominant button look rejected when padding uses logical longhands, font-family is inherited, or colour has a :hover state
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 57/100
Línea de trabajo
Trace the button look collector and dominantButtonLook path described in the issue, then find its contract fixtures and tests. Start by reproducing the minimal case and check how resolved styles handle logical padding, inherited font family, and state variants. Done means the fixture asserts the expected button presets and state style, button blocks no longer duplicate those values, and front-end parity is preserved.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The dominant button look (#3716) never forms when the source sets button padding with logical longhands, inherits the button font, or has a hover colour. The collector only records a look when one element's resolved declarations include padding, border-radius, font-size and font-family. Then dominantButtonLook drops any look that is missing a field or has a state or conditional variant. Builder framework buttons hit all three:
padding-block/padding-inlinelonghands, often through custom properties, instead of thepaddingshorthand.font-familyinherited from the body, not declared on the button.- A
:hovercolour, which markscoloras a state family, so the rest colour is discarded.
kroonsbeautysalon.nl (Jimdo, trunk): all 23 a.jw-btn elements on 4 routes are rejected with missing=padding,font-family state:color. The theme gets no styles.elements.button, although the converter itself resolves every content button to the same look: 14 core/button, each carrying inline #cacaca background, #5b5b5b text, radius and 7.5px 15px padding. A button inserted in the editor gets core defaults, and Global Styles → Button restyles nothing.
Minimal case
3 pages, each with 3 buttons:
<style>
body{font-family:Georgia,serif}
.btn{--edge:15px;display:inline-flex;padding-block:7.5px;padding-inline:var(--edge);font-size:16px;font-weight:700;border-radius:8px;background-color:#cacaca;color:#5b5b5b;text-decoration:none}
.btn:hover{color:#000}
</style>
<a class="btn" href="/a">One</a> <a class="btn" href="/b">Two</a> <a class="btn" href="/c">Three</a>
Expected: styles.elements.button has the background, text colour, radius, padding, size, weight and the inherited family as presets. :hover carries the hover colour. The core/button blocks no longer repeat those values inline. Front-end parity is unchanged.
Expected
- Resolve padding from the shorthand or from physical and logical longhands, after variable resolution.
- Use the computed inherited
font-familywhen the button doesn't declare one. - A state-only variant (
:hover,:focus) keeps the rest value as the look and is emitted as the element's state style. Media or conditional variants still disqualify, as they do today.
Acceptance
- A contract fixture from the minimal case, with element styles asserted and button blocks no longer duplicating them.
- Real check: a kroonsbeautysalon.nl import has
styles.elements.buttonwith#cacaca/#5b5b5b, the 14 content buttons lose their duplicated inline colour, radius and padding, and parity is unchanged.
Investigated by Franklin (Pi via Roadie, anthropic/claude-opus).
- Lenguaje dominante
- PHP
- Estrellas
- 25
- Forks
- 3
- Merge medio
- 2 h 23 min
- PR fusionados (30 d)
- 942
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
-
Captured slideshow pass overwrites the route path, aborting compose with a rebind() TypeErrorAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Automattic/blocks-engine#5003 ·
Los mantenedores suelen responder en 1 día
-
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
Todos los issues de Automattic/blocks-engine
Issues similares
-
enhancement priority Sales
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
novalo-dev/Prestashop-MCP-Server#201 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
web-token/jwt-framework#757 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Include flows spanning the full report time windowPosiblemente ocupada @somethingwithproof la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Cacti/plugin_flowview#306 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wintercms/wn-sitemap-plugin#31 · 2 comentarios ·