From f47b53b928a37a237e3b7e219495f96138d2e146 Mon Sep 17 00:00:00 2001 From: Bauke Date: Sat, 29 Jan 2022 14:21:03 +0100 Subject: [PATCH] Add high contrast themes. --- source/scss/style.scss | 1 + source/scss/themes/_high-contrast.scss | 15 +++++++++++++++ source/ts/utilities/themes.ts | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 source/scss/themes/_high-contrast.scss diff --git a/source/scss/style.scss b/source/scss/style.scss index 6fc1250..798ed25 100644 --- a/source/scss/style.scss +++ b/source/scss/style.scss @@ -3,6 +3,7 @@ // Theme definitions @use 'themes/dracula'; +@use 'themes/high-contrast'; @use 'themes/love'; @use 'themes/monokai'; @use 'themes/solarized'; diff --git a/source/scss/themes/_high-contrast.scss b/source/scss/themes/_high-contrast.scss new file mode 100644 index 0000000..45a6ec3 --- /dev/null +++ b/source/scss/themes/_high-contrast.scss @@ -0,0 +1,15 @@ +.high-contrast-black { + --border-radius: 8px; + --foreground-1: #fff; + --foreground-2: #ddd; + --background-1: #000; + --background-2: #222; +} + +.high-contrast-white { + --border-radius: 8px; + --foreground-1: #000; + --foreground-2: #222; + --background-1: #fff; + --background-2: #ddd; +} diff --git a/source/ts/utilities/themes.ts b/source/ts/utilities/themes.ts index e94e982..9c5f855 100644 --- a/source/ts/utilities/themes.ts +++ b/source/ts/utilities/themes.ts @@ -32,6 +32,14 @@ export const themes: Theme[] = [ cssClass: 'monokai', name: 'Monokai', }, + { + cssClass: 'high-contrast-black', + name: 'High Contrast Black', + }, + { + cssClass: 'high-contrast-white', + name: 'High Contrast White', + }, ].sort((a, b) => a.name.localeCompare(b.name)); export const themeContext = createContext(defaultTheme);