Skip to content

fix(php-transformer): chunk oversized projected stylesheets - #1550

Merged
chubes4 merged 3 commits into
trunkfrom
fix/projected-stylesheet-selector-budget
Sep 3, 2026
Merged

fix(php-transformer): chunk oversized projected stylesheets#1550
chubes4 merged 3 commits into
trunkfrom
fix/projected-stylesheet-selector-budget

Conversation

@chubes4

@chubes4 chubes4 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #1549

Summary

  • split generated CSS at rule boundaries below a conservative selector-record budget
  • preserve selector order, nested conditions, and cascade order
  • keep the original stylesheet path as an ordered @import loader for continuation chunks
  • repeat required charset/namespace preambles without repeating source imports
  • report exact emitted bytes and hashes for every generated chunk

Verification

  • php tests/unit/stylesheet-selector-budget.php
  • composer test (292 parity fixtures plus package-install proof)
  • production-shaped import: 256,848-rule source projection loaded late matching control rules correctly after chunking
  • browser-verified expected control geometry with zero console/page errors
  • git diff --check origin/trunk...HEAD

AI assistance

OpenAI GPT-5.6 Sol via OpenCode measured the CSSOM/computed-style failure in Chrome, implemented generic selector-budget chunking and exact provenance, added deterministic regression coverage, and ran the focused, full, package, import, and browser verification under Chris Huber's direction.

@chubes4
chubes4 merged commit c1be1c4 into trunk Sep 3, 2026
10 checks passed
@chubes4
chubes4 deleted the fix/projected-stylesheet-selector-budget branch September 3, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chunk projected stylesheets below browser selector limits

1 participant