feat: className:@md, named groups, and arbitrary variant attributes - #52
Closed
jrmybtlr wants to merge 5 commits into
Closed
feat: className:@md, named groups, and arbitrary variant attributes#52jrmybtlr wants to merge 5 commits into
jrmybtlr wants to merge 5 commits into
Conversation
JSX cannot parse className:@md or className:group-hover/item. Keep the real Tailwind names via mods() / useMods() / classy.mods and scan those maps into the class manifest instead of inventing substitute characters. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
useclassy-com | da48984 | Commit Preview URL Branch Preview URL |
Aug 25 2026, 09:23 PM |
Keep the same attribute spelling as Vue. UseClassy already rewrites className:@md and className:group-hover/item before JSX parse, matching className:sm:hover. Character substitution and a separate mods() helper both felt unnatural. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
Parse class:/className: modifier names with bracket depth so data-[state=open] keeps its inner =, and [&>*] works as an attribute. Same pre-parse rewrite path as @md and named groups. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
class:hover='…' and className:@md='…' parse the same as double quotes, including whitespace around = and arbitrary variants with inner =. Co-authored-by: Jeremy Butler <jrmybtlr@users.noreply.github.com>
4 tasks
Owner
Author
|
Superseded by #53 (same feature plus local demo/tooling work). |
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
React (and Vue/HTML) use the same modifier attributes for everything Tailwind spells in the variant — including arbitrary ones:
UseClassy parses modifier names with bracket depth, so
=inside[…]is not treated as the attribute separator. Quoted values may use"or'. It rewrites before JSX/HTML parse (same pipeline asclassName:sm:hover).Changes
[&>*],data-[state=open], single quotes, dep-scan rewritemods()helper269 tests passing.
Note: TypeScript / some linters may still flag the source the same way they already flag chained modifiers; Vite is fine because UseClassy runs first.