Add support for analyzing @function at-rules#540
Merged
bartveneman merged 3 commits intomainfrom Mar 16, 2026
Merged
Conversation
Track CSS @function at-rules (CSS Functions and Mixins Module) in a new `atrules.function` collection. Extracts function names from preludes and counts total/unique occurrences. https://claude.ai/code/session_01NZGg1kjwKsnugxGXx3vtLF
Bundle ReportChanges will increase total bundle size by 253 bytes (0.28%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: analyzeCss-esmAssets Changed:
Files in
|
Rename registeredFunctions -> functions (matches scopes, layers, etc.) and use prelude/name instead of prelText/funcName abbreviations. https://claude.ai/code/session_01NZGg1kjwKsnugxGXx3vtLF
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.
Summary
This PR adds support for analyzing CSS
@functionat-rules (from the CSS Mixins specification) to the CSS analyzer. The implementation tracks function definitions, counts their occurrences, and calculates uniqueness metrics similar to existing at-rule analysis.Key Changes
registeredFunctionscollection to track@functionat-rules during CSS parsing@functionprelude text, handling the function signature syntax (e.g.,--my-color(--base))functionproperty to the atrules analysis output with metrics for total count, unique count, and uniqueness ratio@functionat-rules, including edge cases like:@FUNCTION)functionfield in expected outputImplementation Details
@property)https://claude.ai/code/session_01NZGg1kjwKsnugxGXx3vtLF