summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-08-26 17:52:44 +0200
committerGitHub <noreply@github.com>2020-08-26 11:52:44 -0400
commit7d14d6c1c13f1eac4b9456c5db4c3594bc4dc237 (patch)
tree7c1b062b9d39d257c8e7968cbe92d19037e86374 /web_src
parent69b3dd636201d340ab6bdfa49ed95456a4e5acb7 (diff)
downloadgitea-7d14d6c1c13f1eac4b9456c5db4c3594bc4dc237.tar.gz
gitea-7d14d6c1c13f1eac4b9456c5db4c3594bc4dc237.zip
Fix file table overflows (#12603)
- Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553. - Fix submodule columns stretching the table - Refactor template to share more HTML nodes - Introduce CSS helper classes Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/less/_repository.less19
-rw-r--r--web_src/less/helpers.less6
-rw-r--r--web_src/less/index.less1
3 files changed, 21 insertions, 5 deletions
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index c149cc4fe4..26423ff29f 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -361,14 +361,23 @@
width: 120px;
}
- > a {
- width: calc(100% - 8px); /* prevent overflow into adjacant cell */
- display: inline-block;
- padding-top: 8px;
- padding-bottom: 8px;
+ .truncate {
+ display: inline-flex;
+ align-items: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
+ width: 100%;
+ }
+
+ a {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ }
+
+ .at {
+ margin-left: 3px;
+ margin-right: 3px;
}
> * {
diff --git a/web_src/less/helpers.less b/web_src/less/helpers.less
new file mode 100644
index 0000000000..d854d28807
--- /dev/null
+++ b/web_src/less/helpers.less
@@ -0,0 +1,6 @@
+.flex-0 {
+ flex: 0;
+}
+.flex-1 {
+ flex: 1;
+}
diff --git a/web_src/less/index.less b/web_src/less/index.less
index 92b25e1db1..bcc0d54d87 100644
--- a/web_src/less/index.less
+++ b/web_src/less/index.less
@@ -1,5 +1,6 @@
@import "~font-awesome/css/font-awesome.css";
+@import "./helpers.less";
@import "./features/gitgraph.less";
@import "./features/animations.less";
@import "./markdown/mermaid.less";