git.iko.soy/typeable/elm-ui
on master help sign in
allow font color to skip over transparent color of embedded element used for textarea height content
commitb17280a9437db7807bcc04379d735137e8e8427c authorMatthew Griffith <mdg.griffith@gmail.com> dateTue 2 Jul 2019, 21:52 (7 years ago) parenta28ef3b
2 files changed+23−9
src/Internal/Model.elm+23−5 src/Internal/Style.elm−4
src/Internal/Model.elm+23−5
@@ -2681,11 +2681,29 @@ toStyleSheetString options stylesheet =
26812681 ]
26822682
26832683 Colored class prop color ->
2684− renderStyle
2685− maybePseudo
2686− ("." ++ class)
2687− [ Property prop (formatColor color)
2688− ]
2684+ -- This is because the trick we're using to make a txtarea be height:content
2685+ -- stops the inheritance chain for font color.
2686+ -- So we need to pack our bags, hike up our socks and jump over the break.
2687+ if prop == "color" then
2688+ String.concat
2689+ [ renderStyle
2690+ maybePseudo
2691+ ("." ++ class)
2692+ [ Property prop (formatColor color)
2693+ ]
2694+ , renderStyle
2695+ maybePseudo
2696+ ("." ++ class ++ " ." ++ classes.inputMultilineParent ++ " ." ++ classes.inputMultiline)
2697+ [ Property prop (formatColor color)
2698+ ]
2699+ ]
2700+
2701+ else
2702+ renderStyle
2703+ maybePseudo
2704+ ("." ++ class)
2705+ [ Property prop (formatColor color)
2706+ ]
26892707
26902708 SpacingStyle cls x y ->
26912709 let
src/Internal/Style.elm−4
@@ -1531,11 +1531,7 @@ baseSheet =
15311531 [ Prop "white-space" "pre-wrap"
15321532 , Prop "height" "100%"
15331533 , Prop "width" "100%"
1534−
1535− -- , Prop "color" "transparent"
15361534 , Prop "background-color" "transparent"
1537−
1538− -- , Prop "caret-color" "black"
15391535 ]
15401536 , Descriptor (dot classes.inputMultilineParent)
15411537 [ Prop "white-space" "pre-wrap"