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

Strange green point in dashboard repo list #26537

Closed
yp05327 opened this issue Aug 16, 2023 · 14 comments · Fixed by #26553 or #26635
Closed

Strange green point in dashboard repo list #26537

yp05327 opened this issue Aug 16, 2023 · 14 comments · Fixed by #26553 or #26635
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@yp05327
Copy link
Contributor

yp05327 commented Aug 16, 2023

Description

I think this comes from #26520
image
(Using Chrome on Windows)
@silverwind

Gitea Version

latest

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

build

Database

None

@yp05327
Copy link
Contributor Author

yp05327 commented Aug 16, 2023

image

@silverwind
Copy link
Member

silverwind commented Aug 16, 2023

It's a scrollbar. Seems to be some Chrome-only issue because it works. Adding overflow-y: clip does seem to help for the scrollbar but does not fix the "g" cutoff, hmm. Maybe we should revert to overflow: hidden and set a proper line-height where necessary.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Aug 17, 2023

JS Fiddle: https://jsfiddle.net/6Ltbd581/16/

(ps: the line-height: 1 comes from Fomantic UI's menu item)

Chrome:

image

@silverwind
Copy link
Member

silverwind commented Aug 17, 2023

line-height: 1 is the root of the problem, I think at minimum 1.2 is recommended (roughly equivalnt to normal), but I would go for 1.4 to be safe as the right value depends on font in use and we get different fonts on different OSs.

@silverwind silverwind added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Aug 17, 2023
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Aug 17, 2023

The "more"root problem seems that Chrome doesn't consider "descent" into the line-height .... so characters like "g" / "y" causes layout problems .....

image

@wxiaoguang
Copy link
Contributor

-> Fix various line-height styles #26553

silverwind added a commit that referenced this issue Aug 17, 2023
Fix #26537

Use the same default line-height as "normalize.css" instead of "1". "1"
is not right because it doesn't work with descent part and causes
overflow problems.


![image](https://github.com/go-gitea/gitea/assets/2114189/3f2e8fb5-b326-4889-bfff-c79c75f1b7f4)

---------

Co-authored-by: silverwind <[email protected]>
@yp05327
Copy link
Contributor Author

yp05327 commented Aug 18, 2023

@wxiaoguang @silverwind
It seems that this is not completely fixed, I can still see these green things.

in try.gitea.io
image

in local
image
local version:
image

@yp05327
Copy link
Contributor Author

yp05327 commented Aug 18, 2023

Ah, I see. this green thing is a scrollbar. 😄

(removed overflow-x)
image

@yp05327
Copy link
Contributor Author

yp05327 commented Aug 18, 2023

image
image

when --line-height-default is 1.20, it will disappear

the lowest value is 1.18
image
image

@yp05327 yp05327 reopened this Aug 18, 2023
@wxiaoguang
Copy link
Contributor

Then the "modules/normalize.css" should also be changed accordingly

@silverwind
Copy link
Member

silverwind commented Aug 18, 2023

BTW, there is also this useless style in effect on these strings, which results in the too-early truncation. We should remove it, text truncates fine without it as well.

.dashboard.feeds .filter.menu .item .text.truncate,
.dashboard.issues .filter.menu .item .text.truncate {
  width: 75%;
}

Then the "modules/normalize.css" should also be changed accordingly

Not sure I follow. Value is the same there, but I agree we could variablize it.

@yp05327
Copy link
Contributor Author

yp05327 commented Aug 21, 2023

Does --line-height related to screen resolution?
My display is 1920 x 1080.

@silverwind
Copy link
Member

No, line-height only depends on the font's intrinsic height.

@wxiaoguang
Copy link
Contributor

-> Use line-height: 1.2 for default #26635

wxiaoguang added a commit that referenced this issue Aug 22, 2023
Fix #26537 again because 1.15 is too small for some fonts.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
3 participants