diff --git a/lib/proportions.js b/lib/proportions.js index 260a761..1a54987 100644 --- a/lib/proportions.js +++ b/lib/proportions.js @@ -64,9 +64,8 @@ define(['d3-interpolate', 'snabbdom', 'filters/genericnode', 'helper'], var th = V.h('th', a); var td = V.h('td', V.h('span', { style: { - width: Math.round(v * 100) + '%', - backgroundColor: scale(v), - color: 'white' + width: 'calc(25px + ' + Math.round(v * 90) + '%)', + backgroundColor: scale(v) } }, d[1].toFixed(0))); diff --git a/scss/modules/_proportion.scss b/scss/modules/_proportion.scss index a057c49..754dde8 100644 --- a/scss/modules/_proportion.scss +++ b/scss/modules/_proportion.scss @@ -16,6 +16,7 @@ span { box-sizing: border-box; + color: $color-white; display: inline-block; font-weight: bold; min-width: 1.5em;