From de9fb0a8a2a04d77405eda3e780fe83d21bb8304 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Sat, 1 Jun 2019 09:34:39 -0700 Subject: [PATCH] Tweaked guideline background color style --- src/devtools/views/Components/Element.css | 1 + src/devtools/views/Components/Guideline.css | 12 ++++++++++-- src/devtools/views/Components/Guideline.js | 4 +++- src/devtools/views/Components/HocBadges.css | 2 +- src/devtools/views/Settings/SettingsContext.js | 3 ++- src/devtools/views/root.css | 10 ++++++---- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/devtools/views/Components/Element.css b/src/devtools/views/Components/Element.css index 7cd5512188..05a446bb19 100644 --- a/src/devtools/views/Components/Element.css +++ b/src/devtools/views/Components/Element.css @@ -33,6 +33,7 @@ /* Invert colors */ --color-component-name: var(--color-component-name-inverted); + --color-text: var(--color-text-selected); --color-component-badge-background: var( --color-component-badge-background-inverted ); diff --git a/src/devtools/views/Components/Guideline.css b/src/devtools/views/Components/Guideline.css index e3adaed726..3e53e6f3ba 100644 --- a/src/devtools/views/Components/Guideline.css +++ b/src/devtools/views/Components/Guideline.css @@ -1,8 +1,16 @@ -.Guideline { +.Active, +.Inactive { position: absolute; left: 0; width: 100%; z-index: 0; pointer-events: none; - background-color: var(--color-guideline); +} + +.Active { + background-color: var(--color-guideline-active); +} + +.Inactive { + background-color: var(--color-guideline-inactive); } diff --git a/src/devtools/views/Components/Guideline.js b/src/devtools/views/Components/Guideline.js index f2a69292eb..f9e9d7407f 100644 --- a/src/devtools/views/Components/Guideline.js +++ b/src/devtools/views/Components/Guideline.js @@ -3,6 +3,7 @@ import React, { useContext, useMemo } from 'react'; import { TreeStateContext } from './TreeContext'; import { SettingsContext } from '../Settings/SettingsContext'; +import TreeFocusedContext from './TreeFocusedContext'; import { StoreContext } from '../context'; import { useSubscription } from '../hooks'; import Store from '../../store'; @@ -17,6 +18,7 @@ type Data = {| export default function Guideline(_: {||}) { const { lineHeight } = useContext(SettingsContext); const store = useContext(StoreContext); + const treeFocused = useContext(TreeFocusedContext); const { selectedElementID } = useContext(TreeStateContext); const subscription = useMemo( @@ -81,7 +83,7 @@ export default function Guideline(_: {||}) { return (