blob: d2efa392bd9447beb4746d2f76224c314678af08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
- deletion_color = local_assigns.fetch(:deletion, nil)
- addition_color = local_assigns.fetch(:addition, nil)
- if deletion_color.present? || request.path == profile_preferences_path
= stylesheet_link_tag_defer "highlight/diff_custom_colors_deletion"
- if deletion_color.present?
- deletion_color_rgb = hex_color_to_rgb_array(deletion_color).join(',')
:css
:root {
--diff-deletion-color: rgba(#{deletion_color_rgb},0.2);
}
- if addition_color.present? || request.path == profile_preferences_path
= stylesheet_link_tag_defer "highlight/diff_custom_colors_addition"
- if addition_color.present?
- addition_color_rgb = hex_color_to_rgb_array(addition_color).join(',')
:css
:root {
--diff-addition-color: rgba(#{addition_color_rgb},0.2);
}
|