-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use tailwind instead of gt-[wh]-
helper classes
#29423
Conversation
Remove |
I agree with removing the helper class, but I disagree with more than one property per PR. |
Fine with me in any case. |
Similar classes could be done in the same PR. eg: |
One more question, do the |
I did some of them because the previous changes are too small. I think it's still small enough to be reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without !important
, tw-*
might not work in some cases.
I don't think these |
No, tailwind classes like |
The config option is intended exactly for our usecase: |
So yes, this |
Yes, it's equivalent to adding the Long-term I think removing unnecessary |
Then it needs to test every change carefully. To see whether it needs Otherwise, So what do you think about these possible approaches?
|
👍 and 🚀 are both acceptable for me. 🎉 would be too limiting long-term. Assuming @lunny has tested the cases here, this PR would be an example of an ideal 👍 where all |
Sorry but it is not really fully tested. At least, I can see:
|
If we would like to avoid regression, then we can't assume anything. If we would like to tolerate some regressions, then maybe the rule could be relaxed. |
Yes, that' why I redacted my review actually 😆. |
I wonder thought: Is there ever any case where I'm starting leaning towards option 3 actually, the only downside is that the CSS would end up a few bytes bigger because of all these |
That's also my first preference. But I guess few people would agree with it if I said so 😁 so I spent some more time on "finding bugs". |
I think the only case where But I think such cases are rare enough that one can always write custom CSS and I think we likely won't even encounter them because as far as I understand, 99% of tailwind classes map to exactly 1 CSS property. Any classes that map to more than 1 property are breaking the concept of "atomic CSS" and should be avoided anways. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from the pending rewrite to the chosen important mechanism
I strongly believe 🎉 is the way to go now. Developers should not have to worry about CSS precedence when using a atomic CSS framework like tailwind. |
The title should be "Use tw-w-* instead of gt-w-" or something like "Use tailwind for width instead of gt-w-" |
tw-[wh]-.*
instead of gt-[wh]-.*
tw-[wh]-.*
instead of gt-[wh]-.*
gt-[wh]-
helper classes
#29437 for this. |
As per discussion in #29423, I think this is the right way that does not burden developers having to think about CSS precedence which should be irrelevant with an atomic CSS framework. --------- Co-authored-by: wxiaoguang <[email protected]>
After #29437 , I think it is safe to use |
* giteaofficial/main: (23 commits) Fix wrong test usage of `AppSubURL` (go-gitea#29459) Improve contrast on blame timestamp, fix double border (go-gitea#29482) Fix/Improve `processWindowErrorEvent` (go-gitea#29407) Apply compact padding to small buttons with svg icons (go-gitea#29471) Fix counter display number incorrectly displayed on the page (go-gitea#29448) Fix incorrect user location link on profile page (go-gitea#29474) Fix workflow trigger event bugs (go-gitea#29467) Fix URL calculation in clone input box (go-gitea#29470) Remove jQuery from the "find file" page (go-gitea#29456) Move generate from module to service (go-gitea#29465) The job should always run when `if` is `always()` (go-gitea#29464) Recolor dark theme to blue shade (go-gitea#29283) Let ctx.FormOptionalBool() return optional.Option[bool] (go-gitea#29461) Implement actions badge svgs (go-gitea#28102) Fix missed return (go-gitea#29450) Use tailwind instead of `gt-[wh]-` helper classes (go-gitea#29423) Lock issues and pulls faster (go-gitea#29436) Allow to change primary email before account activation (go-gitea#29412) Update docs about `DEFAULT_ACTIONS_URL` (go-gitea#29442) Only use supported sort order for "explore/users" page (go-gitea#29430) ...
Follow #29357
gt-w-*
->tw-w-*
and removegt-w-*
gt-h-*
->tw-h-*
and removegt-h-*