Repository navigation
Improve wrapping of repo header buttons on smaller screens - #5622
cheap-glitch wants to merge 6 commits into
Conversation
cheap-glitch
left a comment
There was a problem hiding this comment.
Note: as shown in the video above, this PR also restores the buttons on mobile — where they're normally hidden by GitHub.
Not sure if this is a welcomed change, so I don't mind dropping it.
|
We don't need to also deal with the buttons on mobile. They're hidden by default there except some on the homepage, right? I'd rather just see some 4-line GitHub bug CSS. I guess my suggested CSS snippet only lacks a |
cheap-glitch
left a comment
There was a problem hiding this comment.
I think I've reduced the CSS to the minimum amount necessary. Unfortunately it still requires a bit more than 4 lines.
| } | ||
|
|
||
| /* Improve wrapping of repo header buttons on smaller screens #5398 */ | ||
| @media (min-width: 768px) { |
There was a problem hiding this comment.
We need the media query to avoid showing all the buttons on mobile.
| #repository-container-header > :first-child > :first-child { | ||
| flex-shrink: 0 !important; | ||
| } |
There was a problem hiding this comment.
We also have to consider long repository names. flex-shrink: 3 or higher gives priority to the title without causing the opposite problem.
not shrink at all
That's the exact reason why this bug exist. This PR causes the opposite problem (buttons are off screen):
We have to allow wrapping, this is too much code to achieve that the wrong way.
| .pagehead-actions li { | ||
| margin-right: 0 !important; | ||
| } |
There was a problem hiding this comment.
Needed because this is replaced by gap on the parent.
There was a problem hiding this comment.
That's likely because the display: flex didn't apply, the selector just needs to be made more specific.
|
Closing in favor of #5623 |




Fixes #5398
Test URLs
refined-github/refined-github
fregante/webext-dynamic-content-scripts
Screenshot
Before 👎
After 👍