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>
11 files changed
tree: e7076a1320e9c86db20ede2cfbb304ba3184a604
  1. bench/
  2. gong/
  3. hashigo/
  4. infra/
  5. kajiya/
  6. kzipinfo/
  7. remote-apis/
  8. runmc/
  9. siso/
  10. .gitignore
  11. .golangci.yml
  12. .style.yapf
  13. BUILD_OWNERS
  14. BUILD_TEAM_OWNERS
  15. CONTRIBUTING.md
  16. LICENSE
  17. OWNERS
  18. PRESUBMIT.py
  19. README.md
  20. WATCHLISTS
README.md

build.git repository

This repository contains tools developed and owned by the Chrome Build Team.

Quick start

The steps for getting the code are:

  1. Install depot_tools
  2. Run git clone https://chromium.googlesource.com/build

We use the standard Go module workflow to work on our projects.

Links