Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Presentational <font size> inside a heading is dropped, so the heading renders at its full heading size

Open
#2,942 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php, wordpress
Domain
devtools

Research direction

The payload names no source files, so start by finding where the converter handles inline elements, and compare it with the align fix referenced in #2889. Reproduce with a neutral fixture of an h2 containing em and font size="3", and check the converted output for the font-size. Done means that fixture converts to 16px, with color and face covered by tests.

Written by the indexing model from the issue text.

Description

Observed

A hosted-builder page marks its form intro as a heading whose text is wrapped in a presentational <font> element:

<h2 class="wsite-content-title"><em><font size="3">We'd appreciate hearing from you! …</font></em></h2>

Browsers render <font size="3"> at 16px, so on the source the intro is small 16px italic text. After conversion (php-transformer v0.43.7), the <font> element and its size are gone. The core/heading renders at the h2 size: 36px at 1440 and 29.25px at 768, against 16px on the source. The text block grows from 62px to 130px tall at 1440, and from 54px to 140px at 768. The retained capture matches the source, so the loss happens during conversion.

This is the same family as #2889 (the presentational align attribute is dropped). Legacy presentational attributes on inline carriers (font[size|color|face]) carry authored typography that has no stylesheet rule to fall back on.

Expected

<font size|color|face> survive as equivalent inline typography on the rich-text run, e.g. a styled mark or carrier with font-size from the HTML size scale (1→10px … 3→16px … 7→48px) and the color and font-family. That lets the heading render at the authored size.

Acceptance

  • A neutral fixture of a heading containing <font size="3"> converts with a computed font-size of 16px (not the heading default).
  • color and face are covered too.

AI disclosure: Pi coding agent (Anthropic model via Roadie) measured this with Playwright and drafted the comment under Chris Huber's direction.

Dominant language
PHP
Stars
21
Forks
2
Avg merge
8h 35m
Merged PRs (30d)
659

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/blocks-engine

All issues in Automattic/blocks-engine

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.