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

Set margin-top to remove button in organization members #23855

Closed
wants to merge 4 commits into from
Closed

Set margin-top to remove button in organization members #23855

wants to merge 4 commits into from

Conversation

BElluu
Copy link
Contributor

@BElluu BElluu commented Mar 31, 2023

Fix #23759
image

@wxiaoguang
Copy link
Contributor

Gitea's codebase avoids using inline style as much as possible. And I guess it's better to use flex instead of margin for general alignments.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 1, 2023
@silverwind
Copy link
Member

silverwind commented Apr 1, 2023

Adding gt-mt-2 class will add 4px margin-top. If that is sufficient, use that. Otherwise use real CSS instead of inline style.

@silverwind
Copy link
Member

And yes, a better fix is to vertically center via flexbox, e.g. add gt-df dt-ac to the parent element.

@BElluu
Copy link
Contributor Author

BElluu commented Apr 1, 2023

@silverwind @wxiaoguang Thank you for your advice. I used gt-mt-3 instead of margin-top and looks pretty nice :)

@silverwind
Copy link
Member

It's still off-center, needs to be refactored to flexbox which will require HTML changes as well because the elements are not in the right order in HTML.

image

I will check it out later.

@silverwind
Copy link
Member

I ended up reworking this more, #23901 is the result.

Your fix did not target the right "Remove" button in the teams/owners page, but targeted the org/members page instead. I put a fix for both, for your case, this was the change that correctly centered it:

https://github.com/go-gitea/gitea/pull/23901/files#diff-1854903b94080fa2568cfa2701a3f1c7a341767e073204c007af034cbcc50402R58

@silverwind silverwind closed this Apr 3, 2023
@BElluu BElluu deleted the PR-23759-button-alignment branch April 3, 2023 21:59
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove user button in org team page is out of alignment
4 participants