summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajat Jain <rjain@gitlab.com>2019-04-15 17:41:39 +0530
committerRajat Jain <rjain@gitlab.com>2019-04-15 17:41:39 +0530
commit934b3a8d28009c54ea0a6863dffce0496eef0d1d (patch)
treee915618b0420bdab2dce2cea3cf06a86fe3b7e13
parent0a99e0220d9371423039f05f700af3675b26624f (diff)
downloadgitlab-ce-48431-width.tar.gz
Hide overflow in scoped labels48431-width
Scoped labels overflew in all the places because of lack of restriction on `max-width`. This commit introduces the same limits on width we have inplace for regular labels
-rw-r--r--app/assets/stylesheets/pages/issuable.scss4
-rw-r--r--app/assets/stylesheets/pages/labels.scss19
2 files changed, 23 insertions, 0 deletions
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index fbd291f095a..f8620eec46d 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -107,6 +107,10 @@
}
.scoped-label-wrapper {
+ > a {
+ max-width: 100%;
+ }
+
.color-label {
padding-right: $gl-padding-24;
}
diff --git a/app/assets/stylesheets/pages/labels.scss b/app/assets/stylesheets/pages/labels.scss
index e7fd7fab32b..d17d20bb683 100644
--- a/app/assets/stylesheets/pages/labels.scss
+++ b/app/assets/stylesheets/pages/labels.scss
@@ -408,12 +408,21 @@
}
.scoped-label-wrapper {
+ max-width: 100%;
+ vertical-align: top;
+
+ .badge {
+ text-overflow: ellipsis;
+ overflow-x: hidden;
+ }
+
&.label-link .color-label a {
color: inherit;
}
.color-label {
padding-right: $gl-padding-24;
+ max-width: 100%;
}
.scoped-label {
@@ -438,3 +447,13 @@
}
}
}
+
+// Don't hide the overflow in system messages
+.system-note-message,
+.issuable-detail {
+ .scoped-label-wrapper {
+ .badge {
+ overflow: initial;
+ }
+ }
+}