From 2d54f937c6450467fd415ca3e6fe7e983d2a74dc Mon Sep 17 00:00:00 2001 From: Aphyr Date: Tue, 15 Jan 2013 23:47:40 -0800 Subject: [PATCH] Normalize grid rendering across firefox and chrome --- lib/riemann/dash/public/views/grid.js | 2 +- lib/riemann/dash/views/css.scss | 52 ++++++++++++++------------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/lib/riemann/dash/public/views/grid.js b/lib/riemann/dash/public/views/grid.js index 486643b..56b77b8 100644 --- a/lib/riemann/dash/public/views/grid.js +++ b/lib/riemann/dash/public/views/grid.js @@ -134,7 +134,7 @@ row.find('th').text(host); this.services.forEach(function(service) { var event = this.events[host][service]; - var element = $('
'); + var element = $(''); this.renderElement(element, event); row.append(element); }, this); diff --git a/lib/riemann/dash/views/css.scss b/lib/riemann/dash/views/css.scss index 03e908c..da14d55 100644 --- a/lib/riemann/dash/views/css.scss +++ b/lib/riemann/dash/views/css.scss @@ -148,7 +148,8 @@ html,table { top: 0; bottom: 0; height: 100%; - background: rgba(0, 0, 0, 0.3); + background: rgba(0, 0, 0, 0.2); + border-radius: 3px; } .state.ok, .bar.ok { @@ -332,41 +333,44 @@ h2 { bottom: 0; } + .bar { + position: static; + display: block; + height: 100%; + } + + .box { + margin: 0; + padding: 0; + position: static; + + .metric { + padding: 3px; + font-weight: normal; + } + } + table { + font-size: 12px; position: absolute; width: 100%; - height: 100%; border-spacing: 3px; - tr > *:first-child { - width: 1px; - } - - th { - font-weight: normal; - vertical-align: top; - text-align: right; - padding: 0 3px; - } - thead { margin: 0; padding: 0; - tr { - padding: 0; - } - th { - margin: 0; + // Work around https://bugs.webkit.org/show_bug.cgi?id=20040 + position: relative; + top: 3px; vertical-align: bottom; + text-align: right; } } - - .box { - position: relative; - vertical-align: top; - text-align: right; - } + } + + tr > *:first-child { + width: 1px; } }