-
-
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
Add tailwindcss #29357
Add tailwindcss #29357
Conversation
|
I thought we had |
I don't want to introduce it with a prefix, it would just far too cumbersome to use. There are provenly no issues as seen in its CSS output into Migration and removal of |
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.
Considering there were already a lot of bugs caused by CSS class name conflicting, I believe using proper prefix for a new framework is a must.
This is a strong requirement from my side. Unless someone could prove that there won't be any conflict and the newly introduced names could be easily searched & replaced & maintained.
Check the In fact, setting the |
This comment was marked as outdated.
This comment was marked as outdated.
We can arrange the CSS so that any conflicting classes can be overridden easily in our helpers.css. Tailwind currently does not generate |
Keeping adding names into "blacklist" is also problematic. When Gitea says that "it supports tailwind", then I try to use some "blacklisted" CSS names, then nothing happens or strange thing happens: it is not friendly to developers, just wastes time again. Adding a proper prefix like |
Yes, but it offloads the problem to each developer having to type more. Well I guess at least we are already used to that with the |
Here's your damn prefix. I strongly dislike it as I'm sure it would have worked without but if you prefer to place extra burden on the developers, so be it. We should aim to remove both the |
I wouldn't call it a burden. At least, it's better than undetectable regressions and strange quirks (lacking some CSS classes).
I could agree, I can see that |
Yeah, a quick +1 of what @denyskon said. Use the prefix now, and then remove it later once fomantic has been refactored out. And a general 🎉 for this PR, tyvm for your work on this. |
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.
Tested with various tmpl syntax, for most cases it works well.
* giteaofficial/main: (45 commits) Include resource state events in Gitlab downloads (go-gitea#29382) Add API to get PR by base/head (go-gitea#29242) [skip ci] Updated translations via Crowdin Improve Documentation for Restoration from backup (go-gitea#29321) Refactor "user/active" related logic (go-gitea#29390) Remove jQuery AJAX from the archive download links (go-gitea#29380) Add tailwindcss (go-gitea#29357) Add missing space (go-gitea#29393) Integrate alpine `noarch` packages into other architectures index (go-gitea#29137) enforce maxlength in frontend (go-gitea#29389) Remove incorrect and unnecessary Escape from templates (go-gitea#29394) Make actions animation rotate counterclockwisely (go-gitea#29378) Use `crypto/sha256` (go-gitea#29386) Add `io.Closer` guidelines (go-gitea#29387) Remove jQuery AJAX from the notice selection deletion button (go-gitea#29381) Refactor Safe modifier (go-gitea#29392) Add attachment support for code review comments (go-gitea#29220) Refactor modules/git global variables (go-gitea#29376) Remove jQuery from the code diff expansion buttons (go-gitea#29385) Remove jQuery AJAX from the markdown editor preview (go-gitea#29384) ...
Follow #29357 - Replace `gt-w-*` -> `tw-w-*` and remove `gt-w-*` - Replace `gt-h-*` -> `tw-h-*` and remove `gt-h-*`
This will get tailwindcss working on a basic level. It provides only the utility classes, e.g. no tailwind base which we don't need because we have our own CSS reset. Without the base, we also do not have their CSS variables so a small amount of features do not work and I removed the generated classes for them.
Note for future developers: This currently uses a
tw-
prefix, so we use it liketw-p-3
.Currently added CSS, all false-positives