Treat theme.json projection as its own cascade origin
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start by tracing the existing guard for CSS-wide keywords through the theme.json projection path, then reproduce the Tailwind example described in the issue. Done means a layered declaration is not projected when a higher layer contests the same property for the same elements, including when the higher layer uses a class rule.
Written by the indexing model from the issue text.
Description
Global Styles is unlayered. A declaration that sits inside a cascade layer in source has a priority the author chose; projecting it into theme.json silently promotes it above every author layer.
#1865 — Tailwind preflight ships @layer base{h1{font-size:inherit}} precisely so @layer utilities{.text-5xl} can win. Projected into Global Styles, that deferral outranked the utility and every heading resolved to the inherited body size. Baking heading sizes then existed largely to work around a promotion we had caused.
Fixed narrowly: CSS-wide keywords inside a layer now stay source-owned.
Proposal: generalise it. A layered declaration should not project when a higher layer contests the same property for the same elements, whatever its value. The existing guard only covers the same target and property declared across multiple layers, and does not see a class rule in a higher layer.
AI assistance: analysis by Claude Sonnet 4.6 via opencode, derived from five fixes landed while importing a live Tailwind v4 site. Reviewed before filing.
- Dominant language
- PHP
- Stars
- 15
- Forks
- 2
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 796
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/blocks-engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#1701 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/blocks-engine#775 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Automattic/blocks-engine#2007 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Automattic/blocks-engine#1998 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Automattic/blocks-engine#1982 ·
All issues in Automattic/blocks-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100