-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Misc CSS fixes #35888
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
base: main
Are you sure you want to change the base?
Misc CSS fixes #35888
Conversation
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Signed-off-by: silverwind <me@silverwind.io>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
This damn history is so finicky, thanks for catching. |
Because there are so many hacky patches, unclear names, style conflicts. |
Interesting, the regressions are all related to that problematic "line-height" 🤣 |
| @@ -1,5 +1,5 @@ | |||
| {{if ctx.RootData.IsSigned}} | |||
| <div class="item action ui dropdown jump pointing top right select-reaction" data-action-url="{{.ActionURL}}"> | |||
| <div class="item action ui dropdown jump pointing top right select-reaction tw-px-[5px]" data-action-url="{{.ActionURL}}"> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to add a bit more spacing around the emoji button, but at the same time not introduce too much spacing between the labels. I guess the clean solution is to put the labels into their own <div> and apply different gaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| line-height: 32px; | ||
| vertical-align: middle; | ||
| color: var(--color-text-light); | ||
| overflow-wrap: break-word; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it is needed? IIRC break-word is already inherited from body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A unbroken string of text did not wrap without it. Guess I will check what can be done with inheritance.
| max-width: 100%; | ||
| padding-right: 1rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it needs these two new styles?
I don't see difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, a unbroken line will wrap exactly at the end of the element, which looks visually unpleasing without any spacing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding-right: 1rem;: add extra space for wrapped content?max-width: 100%;: what does this do?
| background: transparent; | ||
| border-bottom: 0; | ||
| padding: 0; | ||
| min-height: auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the min-height: 41px should be removed from .comment-header, then no need to add a new min-height: auto; here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the header of regular comments can naturally size to 41px, then yes, this woul not be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "min-height: 41px" is from #13463
Do you still remember the reason, maybe it is used to align the triangles? Maybe it's better to add some comments.
And the min-height: 41px can be only applied to .comment-header.avatar-content-left-arrow
| border-bottom: 0; | ||
| padding: 0; | ||
| min-height: auto; | ||
| margin-bottom: 4px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The margin can be provided by .repository.view.issue .comment-list .code-comment .comment-content, it already has other margin spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, this margin is just to introduce a bit more whitespace between comment and header. Maybe a gap will also work.
| margin: 0 -4px; | ||
| padding: 8px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spaces are provided by .repository.view.issue .comment-list .ui.comments, so I think we should avoid the new negative margins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk, the negative margin allows the item to "hang" slightly outside which is nice. Mabye there are better solutions, the current spacing is optimal imho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good time to clean up legacy style conflicts, then it will be easier to make more UI improvements.
And we don't need to fully backport these changes.






Contains a number of minor CSS fixes.
Fix missing border on targeted speech bubble

Add padding to inline comments, slightly more padding around emoji button

Center text on header in code search results

Tweak emoji selector, reducing font size primarily

Minor tweaks to repo sidebar, reduce font size by 1px, center "Release" text with label.

Fix issue comment buttons being misaligned on mobile

Add highlight to actions re-run icon

Fix actions re-run button overflow
