git.iko.soy/rowtype-yoga/purescript-fahrtwind
on main help sign in
String not Style
commit17a880fc862ff6dacc0972a5f9ac281fece8f460 authorMark Eibes <mark.eibes@gmail.com> dateSat 3 Dec 2022, 23:22 (4 years ago) parente14f1c9
2 files changed+7−4
src/Fahrtwind/Style/Border.purs+3−3 src/Fahrtwind/Style/Color/Background.purs+4−1
src/Fahrtwind/Style/Border.purs+3−3
@@ -4,7 +4,6 @@ import Prelude
44
55import Color (Color)
66import React.Basic.Emotion (Style, StyleProperty, borderBox, color, contentBox, css, px, rem, str)
7−import Unsafe.Coerce (unsafeCoerce)
87
98rounded ∷ StyleProperty -> Style
109rounded = css <<< { borderRadius: _ }
@@ -69,10 +68,11 @@ boxSizingBorderBox = css { boxSizing: borderBox }
6968boxSizingContentBox ∷ Style
7069boxSizingContentBox = css { boxSizing: contentBox }
7170
72−borderGradient :: { backgroundGradient :: Style, borderGradient :: Style } -> Style
71+borderGradient :: { backgroundGradient :: String, borderGradient :: String } -> Style
7372borderGradient args =
7473 css
7574 { background: str $
76− unsafeCoerce args.backgroundGradient <> " padding-box, " <> unsafeCoerce args.borderGradient <> " border-box"
75+ args.backgroundGradient <> " padding-box, "
76+ <> (args.borderGradient <> " border-box")
7777 , borderColor: str "transparent"
7878 }
src/Fahrtwind/Style/Color/Background.purs+4−1
@@ -63,7 +63,10 @@ backgroundSize ∷ String → Style
6363backgroundSize = backgroundSize' <<< str
6464
6565linearGradient' :: Int -> Array String -> Style
66−linearGradient' deg colours = css { background: str bg }
66+linearGradient' deg colours = css { background: str (linearGradientString' deg colours) }
67+
68+linearGradientString' :: Int -> Array String -> String
69+linearGradientString' deg colours = bg
6770 where
6871 bg = "linear-gradient(" <> show deg <> "deg, "
6972 <> intercalate "," (colours)