From c7f85572028bc09505a51b1283da2fc3a024de8b Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 28 Feb 2019 12:56:49 -0800 Subject: [PATCH] Improve selected node highlighting by using minWidth instead of width --- src/devtools/views/Element.css | 1 - src/devtools/views/Element.js | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/devtools/views/Element.css b/src/devtools/views/Element.css index 44ec9d3815..6227ee6fef 100644 --- a/src/devtools/views/Element.css +++ b/src/devtools/views/Element.css @@ -1,6 +1,5 @@ .Element, .SelectedElement { - width: 100%; border-radius: 0.25em; position: relative; white-space: nowrap; diff --git a/src/devtools/views/Element.js b/src/devtools/views/Element.js index c0cb4ab34a..ca26ebf08d 100644 --- a/src/devtools/views/Element.js +++ b/src/devtools/views/Element.js @@ -89,6 +89,8 @@ export default function ElementView({ index, style }: Props) { style={{ ...style, // "style" comes from react-window paddingLeft: `${(depth - baseDepth) * 0.75 + 0.25}rem`, + width: undefined, + minWidth: '100%', }} >