Skip to content

Update CSS parser and fix media feature property access#541

Merged
bartveneman merged 1 commit intomainfrom
claude/update-css-parser-MAfvf
Mar 16, 2026
Merged

Update CSS parser and fix media feature property access#541
bartveneman merged 1 commit intomainfrom
claude/update-css-parser-MAfvf

Conversation

@bartveneman
Copy link
Copy Markdown
Member

Summary

Updated the CSS parser dependency and fixed property access for media feature nodes to use the correct property name from the updated parser API.

Key Changes

  • Updated @projectwallace/css-parser dependency from ^0.13.3 to ^0.13.8
  • Changed media feature node property access from node.name to node.property in two locations:
    • src/index.ts: Updated media feature analysis to use node.property instead of node.name
    • src/atrules/atrules.ts: Updated browser hack detection to use node.property instead of node.name

Implementation Details

The CSS parser API was updated in version 0.13.8 to use property instead of name for accessing media feature names. Both occurrences have been updated to maintain consistency with the new parser API and ensure media features and browser hacks are correctly identified.

https://claude.ai/code/session_01NvFNwW9YzH7C77JHtcYR23

… change

The new parser version changed MEDIA_FEATURE nodes to use `property`
instead of `name` for the feature name. Updated index.ts and
atrules.ts to use `node.property` when accessing media feature names.

https://claude.ai/code/session_01NvFNwW9YzH7C77JHtcYR23
@bartveneman bartveneman marked this pull request as ready for review March 16, 2026 15:33
@bartveneman bartveneman merged commit 7afe0d1 into main Mar 16, 2026
5 checks passed
@bartveneman bartveneman deleted the claude/update-css-parser-MAfvf branch March 16, 2026 15:34
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 16, 2026

Bundle Report

Changes will decrease total bundle size by 6.68kB (-6.88%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
analyzeCss-esm 90.41kB -6.68kB (-6.88%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: analyzeCss-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
css-*.js -6.68kB 90.41kB -6.88%

Files in css-*.js:

  • ./src/atrules/atrules.ts → Total Size: 2.19kB

  • ./src/index.ts → Total Size: 30.23kB

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.

3 participants