@@ -691,7 +691,7 @@ textHelper textInput attrs textOptions =
692 TextArea ->
692 TextArea ->
694− { maybePadding, heightContent, maybeSpacing, adjustedAttributes } =
694+ { maybePadding, heightContent, maybeSpacing, adjustedAttributes, maybeBorder } =
695 attributes
695 attributes
696 |> List.foldr
696 |> List.foldr
697 (\attr found ->
697 (\attr found ->
@@ -710,11 +710,24 @@ textHelper textInput attrs textOptions =
713+ Internal.StyleClass _ (Internal.BorderWidth _ t r b l) ->
714+ case found.maybeBorder of
717+ | maybeBorder = Just (Padding t r b l)
718+ , adjustedAttributes = attr :: found.adjustedAttributes
713 Internal.StyleClass _ (Internal.PaddingStyle _ t r b l) ->
724 Internal.StyleClass _ (Internal.PaddingStyle _ t r b l) ->
714 case found.maybePadding of
725 case found.maybePadding of
715 Nothing ->
726 Nothing ->
717 | maybePadding = Just (Padding t r b l)
728 | maybePadding = Just (Padding t r b l)
730+ -- Skip storing padding because it's being customized later
718 , adjustedAttributes = found.adjustedAttributes
731 , adjustedAttributes = found.adjustedAttributes
@@ -737,6 +750,7 @@ textHelper textInput attrs textOptions =
738 { maybePadding = Nothing
751 { maybePadding = Nothing
739 , heightContent = Nothing
752 , heightContent = Nothing
753+ , maybeBorder = Nothing
740 , maybeSpacing = Nothing
754 , maybeSpacing = Nothing
741 , adjustedAttributes = []
755 , adjustedAttributes = []
@@ -766,7 +780,7 @@ textHelper textInput attrs textOptions =
766 Internal.NoAttribute
780 Internal.NoAttribute
768 Just True ->
782 Just True ->
769− textHeightContent textOptions.text spacing maybePadding
783+ textHeightContent textOptions.text spacing maybePadding maybeBorder
771 Just False ->
785 Just False ->
772 Internal.NoAttribute
786 Internal.NoAttribute
@@ -896,7 +910,7 @@ textHelper textInput attrs textOptions =
896 inputElement
910 inputElement
899−textHeightContent textValue spacing maybePadding =
913+textHeightContent textValue spacing maybePadding maybeBorder =
901 newlineCount =
915 newlineCount =
902 String.lines textValue
916 String.lines textValue
@@ -909,13 +923,20 @@ textHeightContent textValue spacing maybePadding =
912− heightValue count =
926+ topBottom (Padding t _ b _) =
913− case maybePadding of
927+ t + b
915− "calc(" ++ String.fromInt count ++ "em + " ++ String.fromInt ((count - 1) * spacing) ++ "px) !important"
929+ additionalSpacing =
930+ ((newlineCount - 1) * spacing)
931+ + Maybe.withDefault 0 (Maybe.map topBottom maybePadding)
932+ + Maybe.withDefault 0 (Maybe.map topBottom maybeBorder)
917− Just (Padding t r b l) ->
934+ heightValue count =
918− "calc(" ++ String.fromInt count ++ "em + " ++ String.fromInt ((t + b) + ((count - 1) * spacing)) ++ "px) !important"
936+ ++ String.fromInt count
938+ ++ String.fromInt additionalSpacing
920 Internal.StyleClass Flag.heightTextAreaContent
941 Internal.StyleClass Flag.heightTextAreaContent
921 (Internal.Single ("textarea-height-" ++ String.fromInt newlineCount)
942 (Internal.Single ("textarea-height-" ++ String.fromInt newlineCount)