diff options
author | zeripath <art27@cantab.net> | 2023-01-14 08:56:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 16:56:44 +0800 |
commit | 265d438a6e44ead4c982790bcd9b5854e7d646da (patch) | |
tree | f2115608473aeaa8bb05ea575b1424958c37d297 /web_src/less | |
parent | 93e907de4173a64263b024293ac867f8111d4c40 (diff) | |
download | gitea-265d438a6e44ead4c982790bcd9b5854e7d646da.tar.gz gitea-265d438a6e44ead4c982790bcd9b5854e7d646da.zip |
fix: PR status layout on mobile (#21547) (#22441)
Backport #21547
This PR fixes the layout of PR status layouts on mobile. For longer
status context names or on very small screens the text would overflow
and push the "Details" and "Required" badges out of the container.
Before:

After:

Co-authored-by: kolaente <k@knt.li>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src/less')
-rw-r--r-- | web_src/less/_repository.less | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index c57bfea434..3b828b2a82 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -3494,3 +3494,41 @@ td.blob-excerpt { max-width: 165px; } } + +.pr-status { + padding: 0 !important; // To clear fomantic's padding on .ui.segment elements + display: flex; + align-items: center; + + .commit-status { + margin: 1em; + flex-shrink: 0; + } + + .status-context { + display: flex; + justify-content: space-between; + width: 100%; + + > span { + padding: 1em 0; + } + } + + .status-details { + display: flex; + padding-right: .5em; + align-items: center; + justify-content: flex-end; + + @media @mediaSm { + flex-direction: column; + align-items: flex-end; + justify-content: center; + } + + > span { + padding-right: .5em; // To match the alignment with the "required" label + } + } +} |