summaryrefslogtreecommitdiffstats
path: root/web_src/less
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-12-30 00:48:28 +0100
committerGitHub <noreply@github.com>2020-12-29 18:48:28 -0500
commit8e5aea88c7095014741f753d5eca14f8f3b6fe2f (patch)
tree58d62d4b27ea7c28617f6511c1f77907f00ee7fb /web_src/less
parentcfc3916b3f99f38620136a93e339b935ae66a16f (diff)
downloadgitea-8e5aea88c7095014741f753d5eca14f8f3b6fe2f.tar.gz
gitea-8e5aea88c7095014741f753d5eca14f8f3b6fe2f.zip
Improve label and text wrapping (#14113)
* Improve label wrapping - Adjust issue list styles so labels can wrap on the same line as the text. This relies on `display: inline` with the HTML whitespace being used as the separator. - Add global word-break: break-word. This should generally avoid text overflows in various places. * add whitespace to history labels * use overflow-wrap * restore word-break rules * use correct pre * use better selector for middle align Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src/less')
-rw-r--r--web_src/less/_base.less1
-rw-r--r--web_src/less/_repository.less16
-rw-r--r--web_src/less/shared/issuelist.less4
3 files changed, 7 insertions, 14 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index 23a289a8f3..9ae13b8c01 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -176,6 +176,7 @@ body {
overflow-y: auto;
display: flex;
flex-direction: column;
+ overflow-wrap: break-word;
}
img {
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index f0764067f2..f0e180019e 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -2620,23 +2620,11 @@
}
}
-.labels-list {
- display: inline-flex;
- flex-wrap: wrap;
-}
-
.labels-list .label {
- margin-top: 1.5px;
- margin-bottom: 1.5px;
- margin-right: 3px;
- margin-left: 0;
+ margin: 2px 0;
display: inline-block !important;
}
-.labels-list .label:last-of-type {
- margin-right: 0;
-}
-
tbody.commit-list {
vertical-align: baseline;
}
@@ -2777,7 +2765,7 @@ tbody.commit-list {
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
- word-break: break-all;
+ word-break: break-word;
}
.repo-buttons {
diff --git a/web_src/less/shared/issuelist.less b/web_src/less/shared/issuelist.less
index dec99e135a..b1f688e362 100644
--- a/web_src/less/shared/issuelist.less
+++ b/web_src/less/shared/issuelist.less
@@ -29,6 +29,10 @@
font-size: 16px;
min-width: 0;
font-weight: 600;
+
+ > * {
+ vertical-align: middle;
+ }
}
.issue-item-bottom-row {