Draft
Conversation
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
3b83c91 to
76285ca
Compare
- Add Transform.re: CSS selector resolution with className support, including unnesting, at-rule handling, and split_by_kind - Decouple Render.rule_list from Resolve.resolve_selectors so rendering and resolution are independent operations - Update Render_test.re to explicitly call Resolve before Render Co-authored-by: David Sancho <davesnx@users.noreply.github.com>
- Buffer: in-memory accumulator for CSS rules during compilation - Css_transform: atomizes rules into individual declarations with unique classNames derived from content hashes (Murmur2) - push/push_keyframe/push_global/get: API for collecting and retrieving extracted CSS Co-authored-by: David Sancho <davesnx@users.noreply.github.com>
- generate.ml: reads .ml/.pp.ml files and extracts [@@@css] attributes into a CSS output file - Supports --output and --verbose flags - packages/bin/dune: add explicit modules field for coexistence Co-authored-by: David Sancho <davesnx@users.noreply.github.com>
- 46 test cases covering selectors, ampersand nesting, combinators, pseudo-elements, attribute selectors, media queries, @supports, and edge cases - Tests use minified render format matching main's Render output Co-authored-by: David Sancho <davesnx@users.noreply.github.com>
Restructure the package from a property-specific parser to a general CSS grammar engine. Adds Levenshtein distance for typo suggestions, proper interpolation extraction, spec module generation, and standard CSS value types. Updates ppx to use the new package.
76285ca to
acd8034
Compare
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.
Introduce CSS extraction and atomization logic with a new CLI tool and tests, building on main.
This PR splits the CSS extraction and atomization logic from the
start-extraction-cleanbranch. It includes:Transform.re: Handles CSS selector resolution, unnesting, and at-rule processing, adapted formain's AST.Render.re: Decouplesrule_listfromResolve.resolve_selectorsfor independent rendering.Css_file.re: Provides an in-memory buffer, rule deduplication, and atomization into unique class names via Murmur2 hashing, without interpolation logic.generateCLI tool: Extracts[@@@css ...]attributes from source files to produce a combined CSS output.Transform_test.ml: Adds 46 test cases for the new transformation logic.Excluded are
Property_to_type, interpolation, and other parser/ppx refactorings from the source branch. All existing tests pass, with one pre-existing failure onmain.