css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics.#825
Merged
css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics.#825
Conversation
The current system of `#[in_range]` is a little clunky, and has problems with extensibility - as adding new variants would require new attributes and touching proc macros, which is contributor unfriendly. This change introduces a set of generics that replace these, instead. This is a much simpler way to handle this and more closely follows the rest of the codebase conventions: derives Parse/Peek etc.
Merged
github-actions bot
pushed a commit
that referenced
this pull request
Jan 25, 2026
## [0.0.15] - 2026-01-25 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) [forcebuild]
github-actions bot
pushed a commit
that referenced
this pull request
Jan 25, 2026
## [0.0.15] - 2026-01-25 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827))
github-actions bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
## [0.0.15] - 2026-01-26 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) - Regenerate css_ast/src/values from csswg drafts (#830) ([#830](#830)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) ### Csskit - chore(deps): update dependencies (patch) (#831) ([#831](#831)) [forcebuild]
github-actions bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
## [0.0.15] - 2026-01-26 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) - Regenerate css_ast/src/values from csswg drafts (#830) ([#830](#830)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) ### Csskit - chore(deps): update dependencies (patch) (#831) ([#831](#831))
github-actions bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
## [0.0.15] - 2026-01-26 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) - Regenerate css_ast/src/values from csswg drafts (#830) ([#830](#830)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) ### Csskit - chore(deps): update dependencies (patch) (#831) ([#831](#831)) ### Csskit_vscode - chore(deps): update dependency oxlint to v1.40.0 (#834) ([#834](#834)) [forcebuild]
github-actions bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
## [0.0.15] - 2026-01-26 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) - Regenerate css_ast/src/values from csswg drafts (#830) ([#830](#830)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) ### Csskit - chore(deps): update dependencies (patch) (#831) ([#831](#831)) ### Csskit_vscode - chore(deps): update dependency oxlint to v1.40.0 (#834) ([#834](#834))
github-actions bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
## [0.0.15] - 2026-01-26 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) - Regenerate css_ast/src/values from csswg drafts (#830) ([#830](#830)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) - css_lexer: De-duplicate escape sequence consumption (#835) ([#835](#835)) ### Csskit - chore(deps): update dependencies (patch) (#831) ([#831](#831)) ### Csskit_vscode - chore(deps): update dependency oxlint to v1.40.0 (#834) ([#834](#834)) [forcebuild]
github-actions bot
pushed a commit
that referenced
this pull request
Jan 26, 2026
## [0.0.15] - 2026-01-26 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) - Regenerate css_ast/src/values from csswg drafts (#830) ([#830](#830)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) - css_lexer: De-duplicate escape sequence consumption (#835) ([#835](#835)) ### Csskit - chore(deps): update dependencies (patch) (#831) ([#831](#831)) ### Csskit_vscode - chore(deps): update dependency oxlint to v1.40.0 (#834) ([#834](#834))
keithamus
added a commit
that referenced
this pull request
Jan 28, 2026
## [0.0.15] - 2026-01-26 ### Css_ast - css_ast/csskit_derives: Add derive(NodeWithMetadata) (#824) ([#824](#824)) - css_ast/csskit_derive/csskit_proc_macro: Add "constrainable" generics. (#825) ([#825](#825)) - css_ast/css_lexer: Preserve sign in an+b, otherwise compact (#828) ([#828](#828)) - css_ast: Don't preserve sign for integer An+B selectors. (#829) ([#829](#829)) - Regenerate css_ast/src/values from csswg drafts (#830) ([#830](#830)) ### Css_lexer - csskit_transform/css_lexer: Check compacted lengths to determine if replacement is shorter. (#827) ([#827](#827)) - css_lexer: De-duplicate escape sequence consumption (#835) ([#835](#835)) ### Csskit - chore(deps): update dependencies (patch) (#831) ([#831](#831)) ### Csskit_vscode - chore(deps): update dependency oxlint to v1.40.0 (#834) ([#834](#834)) [forcebuild]
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.
The current system of
#[in_range]is a little clunky, and has problems withextensibility - as adding new variants would require new attributes and touching
proc macros, which is contributor unfriendly.
This change introduces a set of generics that replace these, instead. This is a
much simpler way to handle this and more closely follows the rest of the
codebase conventions: derives Parse/Peek etc.