Skip to content

feat: add vendor-prefix support in mediafeature#225

Merged
bartveneman merged 1 commit intomainfrom
feat/bvendor-prefix-in-prelude
May 3, 2026
Merged

feat: add vendor-prefix support in mediafeature#225
bartveneman merged 1 commit intomainfrom
feat/bvendor-prefix-in-prelude

Conversation

@bartveneman
Copy link
Copy Markdown
Member

  • Add value getter to CSSNode for MEDIA_FEATURE nodes, returning the
    first child node or null for boolean features like (hover)
  • Add MEDIA_FEATURE case to is_vendor_prefixed getter, checking the
    feature name (e.g. -ms-high-contrasttrue)
  • Add value: CSSNode | null to the MediaFeature type; remove WithChildren
    for consistency with Declaration, which also hides children in favour of
    a typed value accessor
  • Update tests to use feature.value instead of feature.children

@codecov-commenter
Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 194 bytes (0.11%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@projectwallace/css-parser-esm 184.38kB 194 bytes (0.11%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: @projectwallace/css-parser-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
node-types-CORQtdPo.d.ts (New) 23.37kB 23.37kB 100.0% 🚀
css-node-2WA1GE9K.js (New) 14.14kB 14.14kB 100.0% 🚀
node-types-D3K9wUYU.d.ts (Deleted) -23.28kB 0 bytes -100.0% 🗑️
css-node-DSWz7wzo.js (Deleted) -14.04kB 0 bytes -100.0% 🗑️

Files in css-node-2WA1GE9K.js:

  • ./src/css-node.ts → Total Size: 13.94kB

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (ad61272) to head (7073dff).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #225   +/-   ##
=======================================
  Coverage   93.82%   93.83%           
=======================================
  Files          17       17           
  Lines        2947     2951    +4     
  Branches      802      805    +3     
=======================================
+ Hits         2765     2769    +4     
  Misses        182      182           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bartveneman bartveneman merged commit 95e119a into main May 3, 2026
5 checks passed
@bartveneman bartveneman deleted the feat/bvendor-prefix-in-prelude branch May 3, 2026 18:13
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.

2 participants