Commit 985fca2f authored by Max Woolf's avatar Max Woolf

Merge branch 'fix-scoped-labels-color-in-email' into 'master'

Fix scoped label text color in emails

See merge request gitlab-org/gitlab!82360
parents ca20add1 2134516f
......@@ -40,6 +40,11 @@ pre.commit-message {
color: $gl-text-color;
}
.gl-label-text-scoped {
padding: 0 5px;
color: $gl-text-color;
}
.content {
.markdown-code-block pre.code {
padding: $gl-padding-8 $input-horizontal-padding;
......
......@@ -17,7 +17,7 @@ module EE
bg_color: label.color
) + render_label_text(
label.scoped_label_value,
css_class: "gl-label-text-scoped #{label.text_color_class}",
css_class: "gl-label-text-scoped",
suffix: suffix
)
end
......
......@@ -8,24 +8,6 @@ RSpec.describe LabelsHelper do
let(:scoped_label) { build_stubbed(:label, name: 'key::value', project: project).present(issuable_subject: nil) }
describe '#render_label' do
context 'with scoped labels enabled' do
before do
stub_licensed_features(scoped_labels: true)
end
it 'right text span does not have .gl-label-text-dark class if label color is dark' do
scoped_label.color = '#D10069'
expect(render_label(scoped_label)).not_to match(%r(<span.*gl-label-text-dark.*>#{scoped_label.scoped_label_value}</span>)m)
end
it 'right text span has .gl-label-text-dark class if label color is light' do
scoped_label.color = '#FFECDB'
expect(render_label(scoped_label)).to match(%r(<span.*gl-label-text-dark.*>#{scoped_label.scoped_label_value}</span>)m)
end
end
context 'with scoped labels disabled' do
before do
stub_licensed_features(scoped_labels: false)
......
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