FEATURE: Add css classes to stylesheet link elements (#10598)

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.

diff --git a/lib/stylesheet/manager.rb b/lib/stylesheet/manager.rb
index 8b53166..695eae1 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]
-    %[<link href="#{href}" media="#{media}" rel="stylesheet"/>].html_safe
+
+    css_class = media == 'all' ? "light-scheme" : "dark-scheme"
+
+    %[<link href="#{href}" media="#{media}" rel="stylesheet" class="#{css_class}"/>].html_safe
   end
 
   def self.color_scheme_cache_key(color_scheme, theme_id = nil)

GitHub sha: e73ff68f

This commit appears in #10598 which was approved by eviltrout. It was merged by jordanvidrine.