From 5d0ebd014a9cd5d3d152041e888b702faad3b473 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Fri, 11 Mar 2022 22:41:57 +0200 Subject: [PATCH] Dark mode: Invert some images (#2409) Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> --- pep-0001.txt | 1 + pep-0458.txt | 1 + pep-0480.txt | 1 + pep-0495.txt | 2 ++ pep-0525.txt | 1 + pep-0532.txt | 1 + pep-0550.rst | 2 ++ pep-0603.rst | 2 ++ pep-3147.txt | 1 + pep_sphinx_extensions/pep_theme/static/dark.css | 4 ++++ 10 files changed, 16 insertions(+) diff --git a/pep-0001.txt b/pep-0001.txt index 586a2b55994..8aeccfbdf39 100644 --- a/pep-0001.txt +++ b/pep-0001.txt @@ -439,6 +439,7 @@ an API can replace version 1. The possible paths of the status of PEPs are as follows: .. image:: pep-0001-process_flow.png + :class: invert-in-dark-mode :alt: PEP process flow diagram While not shown in the diagram, "Accepted" PEPs may technically move to diff --git a/pep-0458.txt b/pep-0458.txt index df34f4a72e7..400843b36ea 100644 --- a/pep-0458.txt +++ b/pep-0458.txt @@ -489,6 +489,7 @@ trusted to sign for files available on PyPI. The next two sections cover the details of signing repository files and the types of keys used for each role. .. image:: pep-0458-1.png + :class: invert-in-dark-mode Figure 1: An overview of the role metadata available on PyPI. diff --git a/pep-0480.txt b/pep-0480.txt index 0171e584fcf..37d942a1fac 100644 --- a/pep-0480.txt +++ b/pep-0480.txt @@ -207,6 +207,7 @@ packages in the minimum security model, but not in the maximum model, without also compromising a developer's key. .. image:: pep-0480-1.png + :class: invert-in-dark-mode Figure 1: An overview of the metadata layout in the maximum security model. The maximum security model supports continuous delivery and survivable key diff --git a/pep-0495.txt b/pep-0495.txt index 36a26d0f7fc..39d07e2aeab 100644 --- a/pep-0495.txt +++ b/pep-0495.txt @@ -387,6 +387,7 @@ the ``fold`` attribute depending on the kind of the transition. .. image:: pep-0495-fold-2.png :align: center :width: 60% + :class: invert-in-dark-mode The sketch above illustrates the relationship between the UTC and local time around a fall-back transition. The zig-zag line is a graph @@ -412,6 +413,7 @@ effect after the transition should be used. .. image:: pep-0495-gap.png :align: center :width: 60% + :class: invert-in-dark-mode The sketch above illustrates the relationship between the UTC and local time around a spring-forward transition. At the transition, the diff --git a/pep-0525.txt b/pep-0525.txt index 6eb5f252fa9..dc7613b394c 100644 --- a/pep-0525.txt +++ b/pep-0525.txt @@ -389,6 +389,7 @@ iterated: .. image:: pep-0525-1.png :align: center :width: 80% + :class: invert-in-dark-mode PyAsyncGenASend and PyAsyncGenAThrow diff --git a/pep-0532.txt b/pep-0532.txt index 2c38ea2bd88..5a67830b387 100644 --- a/pep-0532.txt +++ b/pep-0532.txt @@ -681,6 +681,7 @@ breaking protocol (although it glosses over the technical detail of looking up the special methods via the type rather than the instance): .. image:: pep-0532/circuit-breaking-protocol.svg + :class: invert-in-dark-mode :alt: diagram of circuit breaking protocol applied to ternary expression We will work through the following expression:: diff --git a/pep-0550.rst b/pep-0550.rst index 558f5578b31..0332900737f 100644 --- a/pep-0550.rst +++ b/pep-0550.rst @@ -1568,6 +1568,7 @@ Appendix: HAMT Performance Analysis .. figure:: pep-0550-hamt_vs_dict-v2.png :align: center :width: 100% + :class: invert-in-dark-mode Figure 1. Benchmark code can be found here: [9]_. @@ -1581,6 +1582,7 @@ The above chart demonstrates that: .. figure:: pep-0550-lookup_hamt.png :align: center :width: 100% + :class: invert-in-dark-mode Figure 2. Benchmark code can be found here: [10]_. diff --git a/pep-0603.rst b/pep-0603.rst index f91a89a6e43..2e0b9d6a7eb 100644 --- a/pep-0603.rst +++ b/pep-0603.rst @@ -298,6 +298,7 @@ Performance .. figure:: pep-0603-hamt_vs_dict.png :align: center :width: 100% + :class: invert-in-dark-mode Figure 1. Benchmark code can be found here: [3]_. @@ -312,6 +313,7 @@ The above chart demonstrates that: .. figure:: pep-0603-lookup_hamt.png :align: center :width: 100% + :class: invert-in-dark-mode Figure 2. Benchmark code can be found here: [4]_. diff --git a/pep-3147.txt b/pep-3147.txt index 359bdf2e425..e8c5a303df6 100644 --- a/pep-3147.txt +++ b/pep-3147.txt @@ -318,6 +318,7 @@ Here is a flow chart describing how modules are loaded: .. image:: pep-3147-1.png :scale: 75 + :class: invert-in-dark-mode Alternative Python implementations diff --git a/pep_sphinx_extensions/pep_theme/static/dark.css b/pep_sphinx_extensions/pep_theme/static/dark.css index 314192d94c9..c324d92f032 100644 --- a/pep_sphinx_extensions/pep_theme/static/dark.css +++ b/pep_sphinx_extensions/pep_theme/static/dark.css @@ -16,3 +16,7 @@ --colour-inline-code: #333; --colour-warning: #900; } + +img.invert-in-dark-mode { + filter: invert(1); +}