diff options
-rw-r--r-- | app/assets/stylesheets/framework/typography.scss | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/variables.scss | 2 | ||||
-rw-r--r-- | lib/gitlab/diff/inline_diff_marker.rb | 14 |
3 files changed, 14 insertions, 6 deletions
diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index 487081c3c7c..3575984b229 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -271,9 +271,9 @@ h1, h2, h3, h4 { } .idiff.deletion { - background: $gl-idiff-deletion; + background: $line-removed-dark; } .idiff.addition { - background: $gl-idiff-addition; + background: $line-added-dark; } diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index b7d8f611621..542c0c53f6f 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -178,8 +178,6 @@ $table-border-gray: #f0f0f0; $line-target-blue: #eaf3fc; $line-select-yellow: #fcf8e7; $line-select-yellow-dark: #f0e2bd; -$gl-idiff-deletion: #f8cbcb; -$gl-idiff-addition: #a6f3a6; /* * Fonts diff --git a/lib/gitlab/diff/inline_diff_marker.rb b/lib/gitlab/diff/inline_diff_marker.rb index c9601d42d50..87a9b1e23ac 100644 --- a/lib/gitlab/diff/inline_diff_marker.rb +++ b/lib/gitlab/diff/inline_diff_marker.rb @@ -28,8 +28,18 @@ module Gitlab # Mark each range marker_ranges.each_with_index do |range, index| - before_content = markdown ? "{#{MARKDOWN_SYMBOLS[mode]}" : "<span class='#{html_class_names(marker_ranges, mode, index)}'>" - after_content = markdown ? "#{MARKDOWN_SYMBOLS[mode]}}" : "</span>" + before_content = + if markdown + "{#{MARKDOWN_SYMBOLS[mode]}" + else + "<span class='#{html_class_names(marker_ranges, mode, index)}'>" + end + after_content = + if markdown + "#{MARKDOWN_SYMBOLS[mode]}}" + else + "</span>" + end offset = insert_around_range(rich_line, range, before_content, after_content, offset) end |