@@ -801,10 +801,9 @@ textHelper textInput attrs textOptions =
801801 defaultTextBoxStyle ++ attrs
802802
803803 redistributed =
804− redistribute (isStacked textOptions.label) withDefaults
805−
806− moveUpToCompensateForPadding =
807− calcMoveToCompensateForPadding withDefaults
804+ redistribute (textInput.type_ == TextArea)
805+ (isStacked textOptions.label)
806+ withDefaults
808807
809808 onlySpacing attr =
810809 case attr of
@@ -864,15 +863,16 @@ textHelper textInput attrs textOptions =
864863 ++ (case textInput.type_ of
865864 TextInputNode inputType ->
866865 [ Internal.Attr (Html.Attributes.type_ inputType)
867− , Internal.htmlClass classes.inputText
868− , Internal.htmlClass "focusable"
866+ , Internal.htmlClass (classes.inputText ++ " " ++ classes.inputMultiline)
867+
868+ -- , Internal.htmlClass "focusable"
869869 ]
870870
871871 TextArea ->
872872 [ Element.clip
873873 , Element.height Element.fill
874874 , Internal.htmlClass classes.inputMultiline
875− , moveUpToCompensateForPadding
875+ , calcMoveToCompensateForPadding withDefaults
876876 ]
877877 )
878878 ++ redistributed.input
@@ -919,7 +919,6 @@ textHelper textInput attrs textOptions =
919919
920920 Just place ->
921921 [ renderPlaceholder place
922− -- redistributed.cover
923922 []
924923 (textOptions.text == "")
925924 ]
@@ -943,7 +942,8 @@ textHelper textInput attrs textOptions =
943942 []
944943
945944 Just place ->
946− [ Element.inFront (renderPlaceholder place redistributed.cover (textOptions.text == ""))
945+ [ Element.behindContent
946+ (renderPlaceholder place redistributed.cover (textOptions.text == ""))
947947 ]
948948 ]
949949 )
@@ -1028,6 +1028,7 @@ redistribute them to the parent, the input, or the cover.
10281028-}
10291029redistribute :
10301030 Bool
1031+ -> Bool
10311032 -> List (Attribute msg)
10321033 ->
10331034 { fullParent : List (Attribute msg)
@@ -1036,8 +1037,8 @@ redistribute :
10361037 , input : List (Attribute msg)
10371038 , cover : List (Attribute msg)
10381039 }
1039−redistribute stacked attrs =
1040− List.foldl (redistributeOver stacked)
1040+redistribute isMultiline stacked attrs =
1041+ List.foldl (redistributeOver isMultiline stacked)
10411042 { fullParent = []
10421043 , parent = []
10431044 , input = []
@@ -1111,7 +1112,7 @@ isPixel len =
11111112
11121113{-| isStacked means that the label is above or below
11131114-}
1114−redistributeOver stacked attr els =
1115+redistributeOver isMultiline stacked attr els =
11151116 case attr of
11161117 Internal.Nearby _ _ ->
11171118 { els | parent = attr :: els.parent }
@@ -1169,14 +1170,35 @@ redistributeOver stacked attr els =
11691170 , wrapper = attr :: els.wrapper
11701171 }
11711172
1172− Internal.StyleClass _ (Internal.PaddingStyle _ _ _ _ _) ->
1173− { els
1174− | parent = attr :: els.parent
1173+ Internal.StyleClass cls (Internal.PaddingStyle pad t r b l) ->
1174+ if isMultiline then
1175+ { els
1176+ | parent = attr :: els.parent
1177+ , cover = attr :: els.cover
1178+ }
11751179
1176− -- input = attr :: els.input
1177− -- , wrapper = attr :: els.wrapper
1178− , cover = attr :: els.cover
1179− }
1180+ else
1181+ let
1182+ newLineHeight =
1183+ Element.htmlAttribute
1184+ (Html.Attributes.style
1185+ "line-height"
1186+ ("calc(1.05em + " ++ String.fromInt (2 * min t b) ++ "px)")
1187+ )
1188+
1189+ reducedVerticalPadding =
1190+ Element.paddingEach
1191+ { top = t - min t b
1192+ , right = r
1193+ , bottom = b - min t b
1194+ , left = l
1195+ }
1196+ in
1197+ { els
1198+ | parent = reducedVerticalPadding :: els.parent
1199+ , input = newLineHeight :: els.input
1200+ , cover = attr :: els.cover
1201+ }
11801202
11811203 Internal.StyleClass _ (Internal.BorderWidth _ _ _ _ _) ->
11821204 { els