-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add options to handle wrapped classes to extend the set of use cases #109
Conversation
Hey @Sett17 sorry I just saw this, could you resolve conflicts and add some tests and I’ll merge this in? Thank you! |
The regex for matching class attributes in HTML has been updated to include support for CSS variables and to optimize for scenarios where the "Name" part of "className" is optional. This enhancement ensures better performance and compatibility with modern CSS practices.
This update introduces a new feature that allows users to specify how individual classes are wrapped in the CLI. This enhancement includes changes in the CLI options to accept a new parameter for class wrapping, adjusts the core sorting logic to accommodate this new setting, and ensures compatibility with existing functionality. The addition of `HowClassesAreWrapped` enum and related functions facilitates handling different class wrapping styles, providing users with more flexibility in how they organize and process their CSS classes.
Hey, I've already added some tests: rustywind/rustywind-core/src/sorter.rs Lines 514 to 607 in f56ca30
Are more or different tests needed? |
Let me know if this works for you; I can remember having some problems with the workspace setup when I made the changes (although it was 2 months ago, so I probably don't remember it 100%) |
Thanks @dikkadev, merged, will release 0.23 with this |
As discussed in #108, a new CLI option,
class_wrapping
, is added to cover more use cases in combination with the existingcustom_regex
option.If the option is not supplied, the default value is used, and the behavior is not changed from before.
Fixes #108