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

Align review-item svg octicons #11065

Merged
merged 2 commits into from
Apr 15, 2020
Merged

Align review-item svg octicons #11065

merged 2 commits into from
Apr 15, 2020

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Apr 14, 2020

Aligns svg octicons in review-item properly.

Before:
firefox_2020-04-14_14-52-49

After:
firefox_2020-04-14_14-53-08

This also solves the issue where different icon types (image and svg) are not aligned

Before:
firefox_2020-04-12_20-31-58
firefox_2020-04-14_14-56-17

After:
firefox_2020-04-14_14-56-23

@techknowlogick techknowlogick added type/bug topic/ui Change the appearance of the Gitea UI labels Apr 14, 2020
@techknowlogick techknowlogick added this to the 1.12.0 milestone Apr 14, 2020
@silverwind
Copy link
Member

I see unequal padding in that box, e.g. there's more padding below the text than on top. I think this may be elegantly solved via flexbox instead of more pixel hacks. Put the left- and right-aligned content into a flexbox with justify-content: space-between and make those two children another flexbox with align-items: center for vertical alignment.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 14, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Apr 14, 2020

I don't see any unequal padding after the removal of pixel hack.

@guillep2k
Copy link
Member

Is it me or the hourglass is still slightly misaligned?

image

@CirnoT
Copy link
Contributor Author

CirnoT commented Apr 15, 2020

This is due to icon size vs svg element size. I am sure this can be somehow solved but I am unsure how. Reluctant to add more pixel hacks as they rely on icon sizes which might change later (which I believe was the cause for this issue in the first place)

@CirnoT
Copy link
Contributor Author

CirnoT commented Apr 15, 2020

Put the left- and right-aligned content into a flexbox with justify-content: space-between and make those two children another flexbox with align-items: center for vertical alignment.

That would require significant refactoring of template, as currently both left and right aligned element are just shoved in and it's CSS job to align them (ie. the template doesn't know what should be left or right).

@silverwind
Copy link
Member

I don't see any unequal padding

The text line is just so slightly pushed 1 or 2 px to the top, presumably because of the icons. Proper fix will be flexbox, but I guess this is still a improvement until then.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 15, 2020
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as silverwind wrote ... better than nothing

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 15, 2020
@6543
Copy link
Member

6543 commented Apr 15, 2020

ping lgtm

@guillep2k
Copy link
Member

Ping LG-TM

@guillep2k guillep2k merged commit 8cdb666 into go-gitea:master Apr 15, 2020
@CirnoT CirnoT deleted the patch-2 branch April 21, 2020 15:31
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants