Inline span padding inside a link is dropped (quote-mark padding-right: 0.15em)

Aperta
#6,979 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php, wordpress
Ambito
backend, content

Direzione di ricerca

Start by tracing how HTML inside RichText is converted, using the provided anchor, span, and CSS example as the reproduction case. Check the existing conversion tests for inline typography and color to find where box properties are handled. Done means the span’s em-relative padding, and any margin, survive conversion while the existing inline formatting remains intact.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Found importing https://javisantana.com/ with Blocks Engine trunk (v0.51.7 plus #6963, #6964 and #6968). After those fixes, this is the only remaining pixel difference the fidelity compare reports on the homepage, at 390, 768 and 1440.

Problem

An inline span's horizontal padding inside a link is dropped:

<a class="t" href="…"><span class="qm">“</span><i>Learn to cook</i></a>
.post-list .row.q .qm { font-style: normal; border: 0; padding-right: 0.15em; }

At 15px the source puts the <i> at x = 482.89; WordPress puts it at x = 480.64. The 2.25px is exactly the span's padding-right: 0.15em. Colour, font, width and underline all match, so this padding is the only difference. Every quote row on the homepage list (.row.q) is affected.

Expected

Box properties (padding, and margin if present) of an inline element that is kept inside RichText survive conversion, the way inline typography and colour do, and stay em-relative.

🤖 Generated with Claude Code

Lingua principale
PHP
Stelle
29
Fork
6
Merge medio
3h 40m
PR unite (30g)
813

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Automattic/blocks-engine

Tutte le issue di Automattic/blocks-engine

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.