@@ -502,27 +502,8 @@ col ∷ FlatTheme StyleProperty
502502col = colour # mapRecord str
503503
504504autoSwitchColourTheme ∷ Style
505−autoSwitchColourTheme = lightT
506− where
507− darkT ∷ Style
508− darkT = unsafeCoerce darkObj
509−
510− darkObj ∷ Object StyleProperty
511− darkObj =
512− Object.fromHomogeneous defaultColours.dark
513− # Object.foldMap \k v →
514− Object.singleton ("--" <> k) (str (Color.cssStringRGBA v))
515−
516− lightObj ∷ Object StyleProperty
517− lightObj =
518− Object.fromHomogeneous defaultColours.light
519− # Object.foldMap \k v →
520− Object.singleton ("--" <> k) (str (Color.cssStringRGBA v))
521− # Object.insert "@media (prefers-color-scheme: dark)" (nested darkT)
522− # Object.insert "&:th" (nested darkT)
523−
524− lightT ∷ Style
525− lightT = unsafeCoerce lightObj
505+autoSwitchColourTheme =
506+ lightModeStyle <> css { "@media (prefers-color-scheme: dark)": (nested darkModeStyle) }
526507
527508lightModeVariables ∷ Object StyleProperty
528509lightModeVariables =