Add dark mode theme support for Mermaid diagrams

Gitiles renders Mermaid diagrams server-side into SVG. Previously, all
SVG shapes (nodes, subgraphs, edges, markers, text, and labels) used
hardcoded light-mode hex values, causing them to display as glaring
white rectangles with poor contrast in dark mode.

This change:
- Defines CSS variables for Mermaid diagram elements (--mermaid-node-bg,
  --mermaid-node-stroke, --mermaid-node-text, --mermaid-edge,
  --mermaid-subgraph-bg, etc.) in doc.css under :root, light mode,
  dark media query, and html[data-theme="dark"].
- Adds semantic CSS classes (.mermaid-node, .mermaid-subgraph,
  .mermaid-edge, .mermaid-arrow, .mermaid-shadow, etc.) to rendered SVG
  elements in SimpleMermaidRenderer while preserving presentation
  attribute fallbacks.
- Selectively applies fill/stroke classes when custom style directives
  are absent, preserving user-defined colors without stylesheet overrides.
- Supports `color:` in `style` directives and computes background
  luminance for custom-filled nodes (e.g. pastel database cylinders)
  to preserve dark, readable text without stylesheet theme inversion.
- Adds comprehensive unit tests in SimpleMermaidRendererTest covering
  theme classes, custom styles, and text contrast on custom-filled shapes.

Change-Id: Iac234a2dd627a06ecceb41c4fabbbbdd92233605
3 files changed
tree: 0806c9da11093cf82d675bdbad56f1f4d9cd3913
  1. .settings/
  2. Documentation/
  3. java/
  4. javatests/
  5. lib/
  6. modules/
  7. resources/
  8. tools/
  9. .bazelignore
  10. .bazelrc
  11. .bazelversion
  12. .gitignore
  13. .gitmodules
  14. .mailmap
  15. .zuul.yaml
  16. BUILD
  17. COPYING
  18. external_deps.lock.json
  19. fake_pom_deploy.xml
  20. MODULE.bazel
  21. MODULE.bazel.lock
  22. navbar.md
  23. README.md
  24. version.bzl
README.md

Gitiles - A simple JGit repository browser

Gitiles is a simple repository browser for Git repositories, built on JGit. Its guiding principle is simplicity: it has no formal access controls, no write access, no fancy Javascript, etc.

Gitiles automatically renders *.md Markdown files into HTML for simplified documentation. Refer to the Markdown documentation for details.

Configuration

Gitiles is configurable in a git-style configuration file named gitiles.config. Refer to the configuration documentation for details.

Bugs

Use gerrit's issue tracker to file bugs.

Contributing to Gitiles

Please refer to the Developer Guide.