diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss index 51a307e4d4e5ef7d1242ca7c7e3b2f6f5eff6928..812587a2ee66820f9e6f14343d25522f251c0e01 100644 --- a/app/assets/stylesheets/sections/commits.scss +++ b/app/assets/stylesheets/sections/commits.scss @@ -99,12 +99,24 @@ } } } + .line_holder { + &.old .old_line, + &.old .new_line { + background: #FCC; + border-color: #E7BABA; + } + &.new .old_line, + &.new .new_line { + background: #CFC; + border-color: #B9ECB9; + } + } .line_content { display: block; white-space: pre; height: 18px; margin: 0px; - padding: 0px; + padding: 0px 0.5em; border: none; &.new { background: #CFD; diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss index a8628fc58f2f696d8baa275c9c06d6a203c93d65..a86384dc2ef1aabae4d041bbf8597305a9f83d2c 100644 --- a/app/assets/stylesheets/sections/notes.scss +++ b/app/assets/stylesheets/sections/notes.scss @@ -213,7 +213,17 @@ ul.notes { .reply-btn { @extend .btn-primary; } -.file .content tr.line_holder:hover > td { background: $hover !important; } +.file .content tr.line_holder:hover { + &> td.line_content { + background: $hover !important; + border-color: darken($hover, 10%) !important; + } + &> td.new_line, + &> td.old_line { + background: darken($hover, 4%) !important; + border-color: darken($hover, 10%) !important; + } +} .file .content tr.line_holder:hover > td .line_note_link { opacity: 1.0; filter: alpha(opacity=100); diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml index 760fd07ed8b9f7175158de5acdd924d9e54eeb94..8f737e43887971625611d2d9f776ff7c23c62269 100644 --- a/app/views/commits/_text_file.html.haml +++ b/app/views/commits/_text_file.html.haml @@ -4,7 +4,7 @@ %table.text-file{class: "#{'hide' if too_big}"} - each_diff_line(diff, index) do |line, type, line_code, line_new, line_old| - %tr.line_holder{ id: line_code } + %tr.line_holder{ id: line_code, class: "#{type}" } - if type == "match" %td.old_line= "..." %td.new_line= "..."