From 25b2f535808e3ebd63549645dc5d8a119e5c4eec Mon Sep 17 00:00:00 2001 From: Hampton Moore Date: Wed, 9 Nov 2022 14:33:12 -0500 Subject: [PATCH] Add prefers-color-scheme based theme --- app/javascript/skins/glitch/mastodon-system/common.scss | 4 ++++ app/javascript/skins/glitch/mastodon-system/names.yml | 4 ++++ app/javascript/skins/vanilla/mastodon-light/names.yml | 2 +- app/javascript/skins/vanilla/mastodon-system/common.scss | 4 ++++ app/javascript/skins/vanilla/mastodon-system/names.yml | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 app/javascript/skins/glitch/mastodon-system/common.scss create mode 100644 app/javascript/skins/glitch/mastodon-system/names.yml create mode 100644 app/javascript/skins/vanilla/mastodon-system/common.scss create mode 100644 app/javascript/skins/vanilla/mastodon-system/names.yml diff --git a/app/javascript/skins/glitch/mastodon-system/common.scss b/app/javascript/skins/glitch/mastodon-system/common.scss new file mode 100644 index 0000000000..c172c2d157 --- /dev/null +++ b/app/javascript/skins/glitch/mastodon-system/common.scss @@ -0,0 +1,4 @@ +@import 'flavours/glitch/styles/mastodon'; +@media (prefers-color-scheme: light) { + @import 'flavours/glitch/styles/mastodon-light'; +} \ No newline at end of file diff --git a/app/javascript/skins/glitch/mastodon-system/names.yml b/app/javascript/skins/glitch/mastodon-system/names.yml new file mode 100644 index 0000000000..089cd28056 --- /dev/null +++ b/app/javascript/skins/glitch/mastodon-system/names.yml @@ -0,0 +1,4 @@ +en: + skins: + glitch: + mastodon-system: Mastodon (system-preferred) diff --git a/app/javascript/skins/vanilla/mastodon-light/names.yml b/app/javascript/skins/vanilla/mastodon-light/names.yml index 5e41d1051d..788526f82d 100644 --- a/app/javascript/skins/vanilla/mastodon-light/names.yml +++ b/app/javascript/skins/vanilla/mastodon-light/names.yml @@ -4,5 +4,5 @@ en: mastodon-light: Mastodon (light) es: skins: - glitch: + vanilla: mastodon-light: Mastodon (claro) diff --git a/app/javascript/skins/vanilla/mastodon-system/common.scss b/app/javascript/skins/vanilla/mastodon-system/common.scss new file mode 100644 index 0000000000..9e4049ff51 --- /dev/null +++ b/app/javascript/skins/vanilla/mastodon-system/common.scss @@ -0,0 +1,4 @@ +@import 'styles/mastodon'; +@media (prefers-color-scheme: light) { + @import 'styles/mastodon-light'; +} \ No newline at end of file diff --git a/app/javascript/skins/vanilla/mastodon-system/names.yml b/app/javascript/skins/vanilla/mastodon-system/names.yml new file mode 100644 index 0000000000..b26039b478 --- /dev/null +++ b/app/javascript/skins/vanilla/mastodon-system/names.yml @@ -0,0 +1,4 @@ +en: + skins: + vanilla: + mastodon-system: Mastodon (system-preferred)