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

未关闭
#6,979 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php, wordpress
领域
backend, content

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
PHP
星标
31
派生
7
平均合并
3 小时 40 分钟
30 天内合并 PR
813

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Automattic/blocks-engine 的其他 Issue

查看 Automattic/blocks-engine 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。