fix: remove value from atrule nodes, fix MediaType/MediaFeature accessors#171
Merged
bartveneman merged 4 commits intomainfrom Mar 11, 2026
Merged
fix: remove value from atrule nodes, fix MediaType/MediaFeature accessors#171bartveneman merged 4 commits intomainfrom
bartveneman merged 4 commits intomainfrom
Conversation
…sors atrule.value: 'screen' -> undefined (use atrule.prelude instead) mediaType.value: null -> 'screen' mediaFeature.name: 'min-width' -> undefined (use mediaFeature.property instead) - Stop setting value offsets on AT_RULE nodes in parse.ts; the prelude is now fully represented by child nodes (AT_RULE_PRELUDE or RAW) - atrule.value returns undefined; atrule.prelude is the correct API - mediaType.value returns the node text (e.g. "screen", "print") - mediaFeature.name returns undefined; use mediaFeature.property instead - has_prelude for AT_RULE now checks first_child type instead of value length Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
=======================================
Coverage 94.99% 94.99%
=======================================
Files 16 16
Lines 2876 2877 +1
Branches 804 807 +3
=======================================
+ Hits 2732 2733 +1
Misses 144 144 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will decrease total bundle size by 62 bytes (-0.04%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: @projectwallace/css-parser-esmAssets Changed:
Files in
Files in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
atrule.value:'screen'->undefined(useatrule.preludeinstead)mediaType.value:null->'screen'mediaFeature.name:'min-width'->undefined(usemediaFeature.propertyinstead)AT_RULEnodes in parse.ts; the prelude is now fully represented by child nodes (AT_RULE_PRELUDEorRAW)atrule.valuereturnsundefined;atrule.preludeis the correct APImediaType.valuereturns the node text (e.g."screen","print")mediaFeature.namereturnsundefined; usemediaFeature.propertyinsteadhas_preludeforAT_RULEnow checksfirst_childtype instead of value length