mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 12:33:47 +08:00
In DevTools you cannot use the `@media (prefers...)` to check for theme because we also allow the user to set it within DevTools (e.g. independently of their OS preference). We did this within the new components by providing a helper class that you could interpolate into a `style` tag within Lit-Html, but today I discovered `:host-context` (https://developer.mozilla.org/en-US/docs/Web/CSS/:host-context()) which enables us to use CSS only to solve this problem. This CL updates ElementsBreadcrumbs to use it and rips out the JS hack we'd used to work around it. Bug: 1122511 Change-Id: I5a8c5cff4b77ee8b8c2cd35d8f79506f6b4c5b5e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2456109 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>