siso: webui adopt native CSS color-scheme, prefers-contrast Take advantage of `color-scheme` by combining the Material 3 light/dark pairs of stylesheets into `light-dark()` pairs, which drops from 6 -> 3. Next, take advantage of `prefers-contrast`. The existing medium and high contrast CSS generated by the Material Theme Builder weren't being wired up, and the web platform doesn't provide a slider for how much "more" contrast. In that case, we may as well be safe and pick the highest contrast palette as the one to apply with `prefers-contrast: more`, and drop the medium contrast palette. This doesn't require any custom JavaScript to apply; the user's OS/browser native contrast settings are automatically respected now. The high contrast palette isn't extreme anyway, it dials up the foreground colors but background colors remain. So in total we drop from 6 -> 3 -> finally 1 theme stylesheet. Downside of doing this is that it's no longer possible to drop in Material Theme Builder stylesheets, but I'd argue that needs to happen so rarely that the reduction in boilerplate code and automatic adoption of light/dark mode + high contrast is much more worthwhile. Change-Id: I3ded7516d336e93d6767c210623c7bca81f56fb5 Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8211659 Reviewed-by: Junji Watanabe <jwata@google.com> Commit-Queue: Richard Wang <richardwa@google.com>
This repository contains tools developed and owned by the Chrome Build Team.
The steps for getting the code are:
git clone https://chromium.googlesource.com/buildWe use the standard Go module workflow to work on our projects.