mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-05 11:31:31 +08:00
Prior to this CL, if we gave the dark mode generation script a CSS
file that contained:
```
.foo {
color: var(--override-some-custom-color);
}
```
The script would generate the following CSS:
```
.-theme-with-dark-background .foo,
:host-context(.-theme-with-dark-background) .foo {
color: var(--override-some-custom-color);
}
```
But because the value of `color` is a variable, this CSS does nothing
that the original CSS won't do. Therefore the CL checks each rule for
any declarations that include `var(--` in them, and removes them from
the CSS that is sent to be dark patched.
Bug: chromium:1188524
Change-Id: I1257ac7c8b9f11426ce5c9b44bd89900072cf1b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2797199
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>