From e45b22cfd77ba58466dfbf024d0fa853bfee8c2f Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Mon, 5 Dec 2011 22:19:11 +0100 Subject: [PATCH] Improve rendering of source code * remove top and bottom borders from all the line numbers * remove top and bottom borders from groups of violations * remove the margin before source code. It can be mixed up with real whitespaces or tabulations in source code --- .../main/webapp/WEB-INF/app/views/resource/index.html.erb | 4 ++-- sonar-server/src/main/webapp/stylesheets/style.css | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb index 3da6bd30dc8..fd76f702500 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb @@ -79,7 +79,7 @@ <% end end %> - <%= index + 1 -%> + <%= index + 1 -%> <% if @display_coverage %> <% if line.highlighted? %> @@ -105,7 +105,7 @@ <% if @scm_available %> <% end %> - + <% line.violations.each_with_index do |violation, index| %> <%= render :partial => 'violation', :locals => {:violation => violation} -%> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index 53f223085c9..a48a8d4f8de 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -834,7 +834,6 @@ ul.operations li img { -o-user-select: none; user-select: none; } - .sources2 td.lid a { text-decoration: none; color: #AAA; @@ -950,7 +949,9 @@ span.rulename a:hover { .sources2 td.line pre { font-size: 12px; font-family: monospace; - margin-left: 1em; +} +.sources2 td.line:hover { + background-color: #ECECEC; } .sources2 td.ind { border-right: 1px solid #DDD; @@ -989,9 +990,7 @@ span.rulename a:hover { .sources2 td.violations { background-color: #FFF; padding: 10px; - border-bottom: 1px solid #DDD; border-right: 1px solid #DDD; - border-top: 1px solid #DDD; } #source_title { -- 2.39.5