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

Adjust line-height on dashboard sidebar #25600

Closed
wants to merge 3 commits into from

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 29, 2023

Fixes: #25597

This is caused by some unintended interaction between our overflow: hidden for ellipsis and fomantic setting line-height: 1 and this is the best I could come up with. Element height is unchanged after this via careful padding adjustment.

Also, I found some untranslated text.

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 29, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 29, 2023
@silverwind silverwind added the backport/v1.20 This PR should be backported to Gitea 1.20 label Jun 29, 2023
@silverwind silverwind added type/bug topic/ui Change the appearance of the Gitea UI labels Jun 29, 2023
web_src/css/dashboard.css Outdated Show resolved Hide resolved
Copy link
Member

@denyskon denyskon left a comment

Choose a reason for hiding this comment

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

I wonder if this kind of issue will appear in other places...

@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 Jul 1, 2023
@silverwind
Copy link
Member Author

Very likely that this is an issue elsewhere. I will check for a more general solution but it will be a bit hacky regardless.

@silverwind silverwind marked this pull request as draft July 1, 2023 07:24
Comment on lines +25 to +26
padding-top: 8.9px; /* adjust for increased line-height */
padding-bottom: 8.9px; /* adjust for increased line-height */
Copy link
Contributor

@wxiaoguang wxiaoguang Jul 1, 2023

Choose a reason for hiding this comment

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

I have seen similar code before (and removed some of them)

IMO it's better to avoid such "fine-tuning", it seems pretty hacky.

Copy link
Member

Choose a reason for hiding this comment

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

Does this .1px really have a visible impact? I'd say 9px or even 8px should be okay

Copy link
Member Author

@silverwind silverwind Jul 3, 2023

Choose a reason for hiding this comment

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

The impact is quite big actually: padding difference is n * 2, e.g. for list of 10 items, 0.1px padding difference will be off by 2 pixels. This is caused by fomantic using some weird calculated padding like 0.912561em. We could theoretically alter the fomantic base styles so the padding is only integer pixels.

@denyskon denyskon self-requested a review July 2, 2023 12:41
@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 2, 2023
@wxiaoguang wxiaoguang mentioned this pull request Aug 6, 2023
@silverwind
Copy link
Member Author

Replaced by #26354.

@silverwind silverwind closed this Aug 7, 2023
@silverwind silverwind deleted the dashoverflow branch August 7, 2023 17:24
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/v1.20 This PR should be backported to Gitea 1.20 lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font baseline is misaligned on issues page
4 participants