aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/less/component-viewer.less1
-rw-r--r--server/sonar-web/src/main/less/ui.less7
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb2
3 files changed, 7 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/less/component-viewer.less b/server/sonar-web/src/main/less/component-viewer.less
index 67e73a6c603..8dfd5113cf3 100644
--- a/server/sonar-web/src/main/less/component-viewer.less
+++ b/server/sonar-web/src/main/less/component-viewer.less
@@ -429,7 +429,6 @@
.rating {
font-size: 18px;
- font-weight: 300;
}
}
diff --git a/server/sonar-web/src/main/less/ui.less b/server/sonar-web/src/main/less/ui.less
index eeb002fdde4..571f245e061 100644
--- a/server/sonar-web/src/main/less/ui.less
+++ b/server/sonar-web/src/main/less/ui.less
@@ -319,8 +319,12 @@ input[type=button] {
*/
.rating {
- padding: 2px 5px;
+ display: inline-block;
+ .size(1em, 1.3em);
+ line-height: 1.3;
color: #fff;
+ font-weight: 300;
+ text-align: center;
}
.rating-A {
@@ -333,6 +337,7 @@ input[type=button] {
.rating-C {
background-color: #FFEE00;
+ color: @baseFontColor;
}
.rating-D {
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
index c9ccaf7012e..9a58a14981d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
@@ -271,7 +271,7 @@ module ApplicationHelper
alert_class="class='alert_#{m.alert_status}'" unless m.metric.val_type==Metric::VALUE_TYPE_LEVEL
link_rel=h(m.alert_text)
elsif m.metric.val_type==Metric::VALUE_TYPE_RATING && m.color
- style = "style='background-color: #{m.color.html};padding: 2px 5px'"
+ alert_class="class='rating rating-" + m.formatted_value + "'"
end
span_id=''