Fix hovered row colors for data grid in forced-colors mode

This is a follow-up to
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3753276

The change was intended to remove striping behavior for data grid rows
in high contrast mode to improve readability, and to indicate selected/
hovered rows with a highlight color.

The above change added a ":not:hover" specifier to the CSS selector
covering background color for odd-numbered data grid rows. Although
hover colors were working in high contrast, the ":not:hover" addition
meant that no rule was covering hovered elements in normal color mode,
so odd rows would flash unstyled if hovered.

Selected rows were also not quite working in high contrast. The "canvas"
rule was taking precedence over the "highlight" rule for selected rows.

This reverts the original change and adds the extra
":not(.dirty):not(.selected)" specifiers to the forced-color rules so
that they will have the correct precedence w.r.t the to normal rules
and each other.

Data grid row colors now work as expected in both normal and high
contrast color modes. There is no special hovering behavior in normal
mode, and both hovered and selected rows are highlighted in high
contrast mode.

Bug: None
Change-Id: If0206ca79f07f8542f1ff71bf52de00af9b48d98
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3965671
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Brandon Walderman <brwalder@microsoft.com>
1 file changed
tree: 3ce40b526c54665ea6fa753c355e71459cb9b765
  1. .vscode/
  2. build_overrides/
  3. config/
  4. docs/
  5. extension-api/
  6. front_end/
  7. inspector_overlay/
  8. node_modules/
  9. scripts/
  10. test/
  11. third_party/
  12. v8/
  13. .clang-format
  14. .editorconfig
  15. .eslintignore
  16. .eslintrc.js
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .mailmap
  21. .npmignore
  22. .npmrc
  23. .style.yapf
  24. .stylelintignore
  25. .stylelintrc.json
  26. AUTHORS
  27. BUILD.gn
  28. codereview.settings
  29. DEPS
  30. LICENSE
  31. OWNERS
  32. package-lock.json
  33. package.json
  34. PRESUBMIT.py
  35. README.md
  36. tsconfig.json
  37. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

The client-side of the Chrome DevTools, including all JS & CSS to run the DevTools webapp.

Source code

The frontend is available on chromium.googlesource.com.

Project documentation

Check out the project documentation for instructions to set up, use, and maintain a DevTools front-end checkout, as well as design guidelines, and architectural documentation.

Additional references

Source mirrors

DevTools frontend repository is mirrored on GitHub.

DevTools frontend is also available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES modules, so consuming this package in other tools may require some effort.

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Getting in touch