summaryrefslogtreecommitdiffstats
path: root/web_src/less/_base.less
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-11-04 08:14:07 +0100
committerGitHub <noreply@github.com>2020-11-04 09:14:07 +0200
commit62719cdd2d7e62cd21f4bfcf8eb9ded37128159a (patch)
tree402d8c20f9e3f40eb2c6c695a45a3dd3497a2376 /web_src/less/_base.less
parent951a3337336d96e363776d874e5a844e0c768f3b (diff)
downloadgitea-62719cdd2d7e62cd21f4bfcf8eb9ded37128159a.tar.gz
gitea-62719cdd2d7e62cd21f4bfcf8eb9ded37128159a.zip
Fix whitespace rendering in diff (#13415)
- Introduce new .code-inner class that sets the CSS attributes on rendered code lines like view,blame and diff. - Rename .wrap class to .word-break to reflect what it actually does - Remove .raw which was only used on webhook page - Set white-space: pre-wrap except on blame where it can break the layout Fixes: https://github.com/go-gitea/gitea/issues/13406
Diffstat (limited to 'web_src/less/_base.less')
-rw-r--r--web_src/less/_base.less52
1 files changed, 12 insertions, 40 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index 9a22e075f5..09e796ac5e 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -177,42 +177,6 @@ a:hover,
color: var(--color-primary-dark-2);
}
-.rounded {
- border-radius: var(--border-radius) !important;
-}
-
-.wrap {
- word-wrap: break-word;
- word-break: break-all;
-}
-
-.mono {
- font-family: var(--fonts-monospace);
-}
-
-pre,
-code {
- font: 12px var(--fonts-monospace);
-
- &.raw {
- padding: 7px 12px;
- margin: 10px 0;
- background-color: #f8f8f8;
- border: 1px solid #dddddd;
- border-radius: 3px;
- font-size: 13px;
- line-height: 1.5;
- overflow: auto;
- }
-
- &.wrap {
- white-space: pre-wrap;
- word-break: break-all;
- overflow-wrap: break-word;
- word-wrap: break-word;
- }
-}
-
.dont-break-out {
overflow-wrap: break-word;
word-wrap: break-word;
@@ -1137,10 +1101,6 @@ i.icon.centerlock {
padding-left: 5px;
}
-.lines-code code {
- white-space: pre;
-}
-
.lines-code.active,
.lines-code .active {
background: #fffbdd !important;
@@ -1155,6 +1115,18 @@ i.icon.centerlock {
padding: 0 !important;
}
+.code-inner {
+ font: 12px var(--fonts-monospace);
+ white-space: pre-wrap;
+ word-break: break-all;
+ overflow-wrap: break-word;
+ word-wrap: break-word;
+}
+
+.blame .code-inner {
+ white-space: pre;
+}
+
.lines-commit {
vertical-align: top;
color: #999999;