From bd149f43648c89c96bc543605c27805079b4c3d7 Mon Sep 17 00:00:00 2001 From: Yash Joshi Date: Mon, 7 Jun 2021 20:51:57 +0530 Subject: [PATCH] fix: trace graph styles (#165) - Prevent vertical shift on hover due to border - Show faded traces --- frontend/src/modules/Traces/TraceGraph.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/modules/Traces/TraceGraph.css b/frontend/src/modules/Traces/TraceGraph.css index 75adcd669e..0b07e4c312 100644 --- a/frontend/src/modules/Traces/TraceGraph.css +++ b/frontend/src/modules/Traces/TraceGraph.css @@ -36,10 +36,16 @@ stroke-linecap: round; stroke-linejoin: round; } + +/* Prevent text vertical shift on hover */ +.d3-flame-graph-label { + border: 1px dotted transparent; + cursor: pointer; +} + /* Transparency simulates sub pixel border https://stackoverflow.com/questions/13891177/css-border-less-than-1px */ .d3-flame-graph-label:hover { - border: 1px dotted; border-color: rgba(255, 255, 255, 0.75); } /* @@ -47,3 +53,7 @@ border: 1px solid; border-color: rgba(255, 255, 255, 0.75); } */ + +.fade:not(.show) { + opacity: 0.5; +} \ No newline at end of file