Commit 5b69b8d9 authored by Rajat Jain's avatar Rajat Jain

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
parent 9235dcd5
...@@ -107,6 +107,10 @@ ...@@ -107,6 +107,10 @@
} }
.scoped-label-wrapper { .scoped-label-wrapper {
> a {
max-width: 100%;
}
.color-label { .color-label {
padding-right: $gl-padding-24; padding-right: $gl-padding-24;
} }
......
...@@ -408,12 +408,21 @@ ...@@ -408,12 +408,21 @@
} }
.scoped-label-wrapper { .scoped-label-wrapper {
max-width: 100%;
vertical-align: top;
.badge {
text-overflow: ellipsis;
overflow-x: hidden;
}
&.label-link .color-label a { &.label-link .color-label a {
color: inherit; color: inherit;
} }
.color-label { .color-label {
padding-right: $gl-padding-24; padding-right: $gl-padding-24;
max-width: 100%;
} }
.scoped-label { .scoped-label {
...@@ -438,3 +447,13 @@ ...@@ -438,3 +447,13 @@
} }
} }
} }
// Don't hide the overflow in system messages
.system-note-message,
.issuable-detail {
.scoped-label-wrapper {
.badge {
overflow: initial;
}
}
}
...@@ -89,7 +89,7 @@ module LabelsHelper ...@@ -89,7 +89,7 @@ module LabelsHelper
def render_colored_label(label, label_suffix: '', tooltip: true, title: nil) def render_colored_label(label, label_suffix: '', tooltip: true, title: nil)
text_color = text_color_for_bg(label.color) 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 # Intentionally not using content_tag here so that this method can be called
# by LabelReferenceFilter # by LabelReferenceFilter
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment