Repository navigation
Fix GitHub bug: Avoid excessive repo title wrap - #5623
Conversation
| justify-content: flex-end; | ||
| } | ||
|
|
||
| :root .pagehead-actions > li { |
There was a problem hiding this comment.
On non-personal repos there's an empty element (Edit pins) that starts taking up space once we add margin-bottom
It has to wrap. Think of the icon as a word of the repo name. Either the icon or the repo name has to wrap. What happens if it doesn't wrap? Should the text wrap and the icon stays on the right (middle)? Then there will be additional space between the name and the icon and it won't look better. If neither wraps, we're back to square one. The ideal behavior would be to have it wrap together with a word, like a proper typesetter would do to avoid the orphan, but:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Yep, that's why it's "impossible". The alternative is to move the last word out of the link, wrap it with the icon, link it again (just the last word), but then we'd have two separate links for the same repo name. Still not a good compromise. |
| flex-shrink: 3 !important; | ||
| display: inline-flex !important; | ||
| flex-wrap: wrap; | ||
| justify-content: flex-end; |
There was a problem hiding this comment.
| justify-content: flex-end; | |
| justify-content: flex-end; | |
| margin: 0 -8px -8px 0; /* Offset the unwanted padding caused by the margins on children elements */ |
There was a problem hiding this comment.
What for? I don't see any unwanted padding
There was a problem hiding this comment.
This directly overrides the margin we set above, CSS should ideally never undo itself.
I'll use margin: 8px 8px 0 0; to replace the existing value
|
Great Team work! |


Fixes #5398
Replaces #5622
Test URLs
https://github.com/refined-github/refined-github
https://github.com/fregante/webext-dynamic-content-scripts
Before
After
Unfortunately the parent’s flexbox is still pretty bad at sharing the space, but it's unlikely that we can do much about it: Once flexbox has to wrap something, it will drop space from both: 1/4 from the title and 3/4 from the actions. This can cause both sides to wrap internally even even the sum of the available space is available from at least one more piece from either side: