-
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
sort @apply in css files #54
Comments
I did this with a custom regex |
Is there a way not to break other lines?
modified src/styles/base/utilities.css
@@ -2,10 +2,7 @@
/* subtle 'fade in' to the lazyloaded image */
[data-lazy] {
- @apply w-full opacity-0;
-
- transition: opacity 0.25s ease-in;
- min-height: 120px;
+ @apply w-full opacity-0; transition: opacity 0.25s ease-in; min-height: 120px;
} Expected: (don't change other lines) [data-lazy] {
+ @apply w-full opacity-0;
transition: opacity 0.25s ease-in;
min-height: 120px;
}
|
Instead of |
Thank you. Worked like a charm! Before: /* subtle 'fade in' to the lazyloaded image */
[data-lazy] {
- @apply w-full opacity-0;
-
- transition: opacity 0.25s ease-in;
- min-height: 120px;
+ @apply w-full opacity-0; transition: opacity 0.25s ease-in; min-height: 120px;
} After: ✅ (I change the class order of @apply to see it it works but doesn't mess the other lines) @@ -2,7 +2,7 @@
/* subtle 'fade in' to the lazyloaded image */
[data-lazy] {
- @apply w-full opacity-0;
+ @apply opacity-0 w-full;
transition: opacity 0.25s ease-in;
min-height: 120px; @alexpriftuli What a regex guru! Thanks a lot!. |
@praveenperera would you like this to be an included feature? Maybe a flag specifically for doing the |
@Rolv-Apneseth I forget if we support multiple regex's now, if so we could add it as another regex. Will need some tests to confirm its working on not messing other stuff up. |
As in - it would just get run by default? But yeah I could try do this when I have some time. |
Hey sorry forgot about this, didn't get a notification for the reaction. So I don't think there's currently a way for running multiple regexes, but I could try implement that if you like. So the Alternatively (I think) this regex can handle both cases Are you sure this wouldn't be better behind some kind of flag since it's covering a different use-case? |
Hello! I would prefer the regex handling both case, notably because of editor integration that run on save. If the regex handle both, there is nothing more to do. Thank you! |
My plan is to write parsers for different files that can extract the classes, I'll start with one for css. It will always fallback to the default regex and you'll have the option to skip the parsers completely. |
Are there plans to support this?
The text was updated successfully, but these errors were encountered: