[clang] [docs] Fix good/bad table rendering when the theme is auto-selected to be dark (PR #230545)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 08:04:32 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: NeKon69

<details>
<summary>Changes</summary>

When the system prefers dark mode and Furo is set to follow system-wide preferences (i.e. `auto`), switch to dark-styled table rendering.

Before:
<img width="945" height="370" alt="image" src="https://github.com/user-attachments/assets/e0e33120-52a2-49da-84c3-59a70f3a212b" />

After:
<img width="943" height="377" alt="image" src="https://github.com/user-attachments/assets/60f84107-cc67-49bb-b050-7559c2f81e76" />

Fixes #<!-- -->228952

---
Full diff: https://github.com/llvm/llvm-project/pull/230545.diff


1 Files Affected:

- (modified) clang/docs/_static/custom.css (+9) 


``````````diff
diff --git a/clang/docs/_static/custom.css b/clang/docs/_static/custom.css
index d159acd79a3668..a1f167901817fd 100644
--- a/clang/docs/_static/custom.css
+++ b/clang/docs/_static/custom.css
@@ -14,6 +14,15 @@ body[data-theme="dark"] {
   --clang-code-comparison-good-border: #3fb950;
 }
 
+ at media (prefers-color-scheme: dark) {
+  body[data-theme="auto"] {
+    --clang-code-comparison-bad-background: rgba(248, 81, 73, 0.16);
+    --clang-code-comparison-bad-border: #f85149;
+    --clang-code-comparison-good-background: rgba(63, 185, 80, 0.16);
+    --clang-code-comparison-good-border: #3fb950;
+  }
+}
+
 /* Use the full viewport on ordinary desktop displays, where Furo's fixed
    content width leaves little room after both sidebars. Once the content area
    reaches 90em (84em plus padding), grow symmetric outer margins instead. */

``````````

</details>


https://github.com/llvm/llvm-project/pull/230545


More information about the cfe-commits mailing list