git.iko.soy/rowtype-yoga/ry-blocks
on main help sign in
Style more
commitb34e248e70e1c64f92ffad3bd0340f352515c1cb authorMark Eibes <mark.eibes@gmail.com> dateTue 26 Jul 2022, 10:32 (4 years ago) parent8e1d098
1 file changed+2−21
src/Yoga/Block/Container/Style.purs+2−21
src/Yoga/Block/Container/Style.purs+2−21
@@ -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 =