🐛 [BUG] Incorrect value for --treeViewItem-leadingVisual-iconColor-rest
in dark high contrast mode
#1083
Labels
bug
Something isn't working
Describe the bug
TL;DR
In dark high contrast mode, the current value of
--treeViewItem-leadingVisual-bgColor-rest
(#b7bdc8
) is incorrect. We need to update the value to the correct value,#f0f3f6
.Full story
While working on primer/react#5267, I ran into unexpected visual regression test failures. Specifically, the visual regression tests were failing in dark high contrast mode only because the expected value for the TreeView.Item LeadingVisual icon fill was different than the actual value.
Prior to primer/react#5267, the icon fill was set by custom theming within primer/react that referenced a deprecated variable and a hard-coded fallback value:
The variable
--treeViewItem-leadingVisual-bgColor-rest
was replaced by--treeViewItem-leadingVisual-iconColor-rest
in #686. When that replacement was made, we didn't update the theme in primer/react. As a result, when we calculate thefill
value, it always uses the fallback, because the given variables no longer exist. This fallback is technically the "correct" color for dark high contrast mode.Currently,
--treeViewItem-leadingVisual-bgColor-rest
is using a different value in dark high contrast mode,#b7bdc8
. This value is incorrect. It should be using#f0f3f6
instead. We updated the primer/react snapshots as a temporary workaround, but now that primer/react#5267 has shipped, we should update the variable to the correct value.Reproduction steps
Review vrt test report: vrt-all-flags.zip
Expected behavior
TreeView.Item leading visual icon fill is
#f0f3f6
in dark high contrast mode.Screenshots
References
/cc @langermank
The text was updated successfully, but these errors were encountered: