Skip to content

CSS API: Add CSS token processor foundations#92

Draft
sirreal wants to merge 1 commit into
trunkfrom
css-api/css-token-processor-foundations
Draft

CSS API: Add CSS token processor foundations#92
sirreal wants to merge 1 commit into
trunkfrom
css-api/css-token-processor-foundations

Conversation

@sirreal

@sirreal sirreal commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • add WP_CSS_Token_Processor as the low-level CSS Syntax tokenization foundation
  • add WP_CSS_Builder, used to serialize token values safely
  • load both classes during WordPress bootstrap
  • add focused unit coverage and the synchronized PHP Toolkit CSS corpus

This is intentionally extracted from css-api/add-css-token-processor without its adjacent stylesheet parser, font normalization, selector, and custom test-harness explorations. It provides a small base for follow-up CSS API work.

Validation

  • WP_TESTS_SKIP_INSTALL=1 vendor/bin/phpunit tests/phpunit/tests/css-api/wpCssBuilder.php — 39 tests, 96 assertions
  • WP_TESTS_SKIP_INSTALL=1 vendor/bin/phpunit tests/phpunit/tests/css-api/wpCssTokenProcessor.php — 264 tests, 373 assertions
  • vendor/bin/phpcs --standard=phpcs.xml.dist on the four PHP files
  • git diff --check

@sirreal
sirreal force-pushed the css-api/css-token-processor-foundations branch from b7e1df7 to 2a146f7 Compare July 23, 2026 10:31
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.

1 participant