git.iko.soy/rowtype-yoga/ry-blocks
on main help sign in
Style more
b34e248Mark Eibes
src/Yoga/Block/Container/Style.purs+2−21
@@ -502,27 +502,8 @@ col ∷ FlatTheme StyleProperty
502col = colour # mapRecord str
502col = colour # mapRecord str
503
503
504autoSwitchColourTheme ∷ Style
504autoSwitchColourTheme ∷ Style
505−autoSwitchColourTheme = lightT
505+autoSwitchColourTheme =
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)
506+ lightModeStyle <> css { "@media (prefers-color-scheme: dark)": (nested darkModeStyle) }
522− # Object.insert "&:th" (nested darkT)
523−
524− lightT ∷ Style
525− lightT = unsafeCoerce lightObj
526
507
527lightModeVariables ∷ Object StyleProperty
508lightModeVariables ∷ Object StyleProperty
528lightModeVariables =
509lightModeVariables =