From 2fbd0695abc08212d1da2fc3e71a3417c71e7f65 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 26 Feb 2026 14:13:54 +0100 Subject: [PATCH] Add colors for thread safety annotations --- python_docs_theme/static/pydoctheme.css | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 8c0ddfc..a83030a 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -444,6 +444,26 @@ div.footer a:hover { color: #229; } +/* C API thread safety annotations */ +:root { + --threadsafety-incompatible: var(--bad-color); + --threadsafety-compatible: var(--middle-color); + --threadsafety-safe: var(--good-color); +} + +.threadsafety.threadsafety-incompatible { + color: var(--threadsafety-incompatible); +} + +.threadsafety.threadsafety-compatible { + color: var(--threadsafety-compatible); +} + +.threadsafety.threadsafety-safe { + color: var(--threadsafety-safe); +} + + dl > dt span ~ em, .sig { font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;