From e73ff68f757992f5f2aaf307ee4fd75af6ac1dc3 Mon Sep 17 00:00:00 2001
From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com>
Date: Fri, 4 Sep 2020 15:40:40 -0500
Subject: [PATCH] FEATURE: Add css classes to stylesheet link elements (#10598)
Adding these classes to the stylesheet link elements in order to toggle dark/light schemes via this theme-component. Eventually this theme-component could possible be merged into core.
---
lib/stylesheet/manager.rb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/stylesheet/manager.rb b/lib/stylesheet/manager.rb
index 8b53166c382..695eae1b53f 100644
--- a/lib/stylesheet/manager.rb
+++ b/lib/stylesheet/manager.rb
@@ -135,7 +135,10 @@ class Stylesheet::Manager
return '' if !stylesheet
href = stylesheet[:new_href]
- %[].html_safe
+
+ css_class = media == 'all' ? "light-scheme" : "dark-scheme"
+
+ %[].html_safe
end
def self.color_scheme_cache_key(color_scheme, theme_id = nil)