From 43f8f04e2a563381573c9e6cc9b12a67ac8f71fb Mon Sep 17 00:00:00 2001 From: Catherine Date: Tue, 19 Mar 2024 16:49:31 +0000 Subject: [PATCH] Invert colors in diagrams if a dark theme is selected. --- book.toml | 1 + text/0049-soc-gpio-peripheral/overview.svg | 14 ++++++++++++-- text/0049-soc-gpio-peripheral/reg-input.svg | 2 +- text/0049-soc-gpio-peripheral/reg-mode.svg | 2 +- text/0049-soc-gpio-peripheral/reg-output.svg | 2 +- text/0049-soc-gpio-peripheral/reg-setclr.svg | 2 +- theme/img-color-scheme.css | 10 ++++++++++ 7 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 theme/img-color-scheme.css diff --git a/book.toml b/book.toml index 376dc9d..82c09a8 100644 --- a/book.toml +++ b/book.toml @@ -4,6 +4,7 @@ title = "The Amaranth RFC Book" [output.html] no-section-label = true git-repository-url = "https://github.com/amaranth-lang/rfcs" +additional-css = ["theme/img-color-scheme.css"] [output.html.search] heading-split-level = 0 diff --git a/text/0049-soc-gpio-peripheral/overview.svg b/text/0049-soc-gpio-peripheral/overview.svg index 27e50e3..067f06b 100644 --- a/text/0049-soc-gpio-peripheral/overview.svg +++ b/text/0049-soc-gpio-peripheral/overview.svg @@ -16,6 +16,16 @@ src: url("https://excalidraw.com/Assistant-Regular.woff2"); } - + + - InputOutputSetClrModeIOOE10 \ No newline at end of file + InputOutputSetClrModeIOOE10 \ No newline at end of file diff --git a/text/0049-soc-gpio-peripheral/reg-input.svg b/text/0049-soc-gpio-peripheral/reg-input.svg index 89ca4e9..3072fde 100644 --- a/text/0049-soc-gpio-peripheral/reg-input.svg +++ b/text/0049-soc-gpio-peripheral/reg-input.svg @@ -1 +1 @@ -0123pin_0pin_1pin_2pin_3RRRR +0123pin_0pin_1pin_2pin_3RRRR diff --git a/text/0049-soc-gpio-peripheral/reg-mode.svg b/text/0049-soc-gpio-peripheral/reg-mode.svg index 7ec3abe..bbc548e 100644 --- a/text/0049-soc-gpio-peripheral/reg-mode.svg +++ b/text/0049-soc-gpio-peripheral/reg-mode.svg @@ -1 +1 @@ -01234567pin_0pin_1pin_2pin_3RWRWRWRW +01234567pin_0pin_1pin_2pin_3RWRWRWRW diff --git a/text/0049-soc-gpio-peripheral/reg-output.svg b/text/0049-soc-gpio-peripheral/reg-output.svg index 79bf26a..1254c67 100644 --- a/text/0049-soc-gpio-peripheral/reg-output.svg +++ b/text/0049-soc-gpio-peripheral/reg-output.svg @@ -1 +1 @@ -0123pin_0pin_1pin_2pin_3RWRWRWRW +0123pin_0pin_1pin_2pin_3RWRWRWRW diff --git a/text/0049-soc-gpio-peripheral/reg-setclr.svg b/text/0049-soc-gpio-peripheral/reg-setclr.svg index 353f7eb..117204a 100644 --- a/text/0049-soc-gpio-peripheral/reg-setclr.svg +++ b/text/0049-soc-gpio-peripheral/reg-setclr.svg @@ -1 +1 @@ -01234567pin_0pin_1pin_2pin_3WWWW +01234567pin_0pin_1pin_2pin_3WWWW diff --git a/theme/img-color-scheme.css b/theme/img-color-scheme.css new file mode 100644 index 0000000..6a7169f --- /dev/null +++ b/theme/img-color-scheme.css @@ -0,0 +1,10 @@ +.light, .rust { + img { + color-scheme: light; + } +} +.ayu, .coal, .navy { + img { + color-scheme: dark; + } +}