From 934b3a8d28009c54ea0a6863dffce0496eef0d1d Mon Sep 17 00:00:00 2001 From: Rajat Jain Date: Mon, 15 Apr 2019 17:41:39 +0530 Subject: Hide overflow in scoped labels 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 --- app/assets/stylesheets/pages/issuable.scss | 4 ++++ app/assets/stylesheets/pages/labels.scss | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) 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; + } + } +} -- cgit v1.2.1