Skip to content
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

[Proposal] Use tailwind style CSS class names for legacy helpers #23011

Closed
wxiaoguang opened this issue Feb 20, 2023 · 6 comments
Closed

[Proposal] Use tailwind style CSS class names for legacy helpers #23011

wxiaoguang opened this issue Feb 20, 2023 · 6 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@wxiaoguang
Copy link
Contributor

Feature Description

Before, the helper classes are called df, ac, sb, which are very difficult to understand.

Now, Gitea has its own prefix gt-, so it's time to improve the legacy CSS class names. It would be very easy to do a search & replace since these names all have prefixes.

Reference: https://tailwind.build/classes

Example:

gt-db => gt-block
gt-df => gt-flex
gt-h-100 => gt-h-full
...

Screenshots

No response

@wxiaoguang wxiaoguang added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Feb 20, 2023
@gempir
Copy link
Contributor

gempir commented Feb 21, 2023

Would you encourage the usage of tailwind generally? As opposed to styling via css, in vuejs?

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Feb 21, 2023

I am not sure, maybe it's too early to introduce whole tailwind.

IMO, at the moment, these gt- helper classes seem enough, if there are something useful and general enough, they could be added one by one, instead of introducing the whole tailwind.

@wxiaoguang
Copy link
Contributor Author

Maybe in the near future, the rule is as simple as:

  • If there is a gt- helper class, then it can be used instead of other CSS styling.
  • Otherwise, continue to use well-defined CSS styles.

So Gitea could only have some very widely used tailwind-style CSS helpers, avoid filling every class attribute with plenty of class names.

@gempir
Copy link
Contributor

gempir commented Feb 21, 2023

I find introducing parts of tailwind more confusing than just sticking to project owned helper classes.
Because then you have to be familiar with which parts of tailwind are introduced and new contributors just see "cool tailwind" but in reality it's just a fraction of tailwind.

Generally I would either say remove helper classes over time and only roll with css in vuejs OR just use tailwind everywhere.

@wxiaoguang
Copy link
Contributor Author

I see your point. Actually, the tailwind-style already happened, there are already many. And I assume that maybe nobody has the confidence to introduce the whole tailwind at the moment, so maybe in the near future it's good to keep it as it was, only rename some legacy unclear helpers like db to gt-block.

/* below class names match Tailwind CSS */

@wxiaoguang
Copy link
Contributor Author

There are still many other problems in Gitea's frontend framework.

I don't see a progress for this proposal, so close it, until there is a clear picture.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants