diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2019-04-16 13:14:24 +0000 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-04-17 10:21:07 +0000 |
commit | 0456c1a8bd31a1a1322b519e1883b1558ccd0494 (patch) | |
tree | cf1b8fe70a36e535def20f2f5fe78e3029052922 | |
parent | a1f617a2be5e0df21bb9fd0dad0c32a90f8c55bd (diff) | |
download | gitlab-ce-0456c1a8bd31a1a1322b519e1883b1558ccd0494.tar.gz |
Merge branch '48431-width' into 'master'
Hide overflow in scoped labels
Closes #48431
See merge request gitlab-org/gitlab-ce!27362
(cherry picked from commit 86be4a6f466205b415de74330dd495a2e8b3c9d0)
17a48fad Hide overflow in scoped labels
-rw-r--r-- | app/assets/stylesheets/pages/issuable.scss | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/labels.scss | 19 | ||||
-rw-r--r-- | app/helpers/labels_helper.rb | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 9be3f8138a0..8a11667d248 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -112,6 +112,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; + } + } +} diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index e91e8f85515..a07c3f90a91 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -89,7 +89,7 @@ module LabelsHelper def render_colored_label(label, label_suffix: '', tooltip: true, title: nil) text_color = text_color_for_bg(label.color) - title ||= tooltip ? label_tooltip_title(label) : '' + title ||= tooltip ? label_tooltip_title(label) : label.name # Intentionally not using content_tag here so that this method can be called # by LabelReferenceFilter |