@@ -647,21 +647,14 @@ wrappedRow attrs children =
647647 newPadding =
648648 case padded of
649649 Just (Internal.Padding name t r b l) ->
650− if r >= x && b >= y then
650+ if r >= (x // 2) && b >= (y // 2) then
651651 Just <|
652− Internal.StyleClass
653− Flag.padding
654− (Internal.PaddingStyle
655− (Internal.paddingName t
656− (r - x)
657− (b - y)
658− l
659− )
660− t
661− (r - x)
662− (b - y)
663− l
664− )
652+ paddingEach
653+ { top = t - (y // 2)
654+ , right = r - (x // 2)
655+ , bottom = b - (y // 2)
656+ , left = l - (x // 2)
657+ }
665658
666659 else
667660 Nothing
@@ -690,6 +683,13 @@ wrappedRow attrs children =
690683
691684 Nothing ->
692685 -- Not enough space in padding to compensate for spacing
686+ let
687+ halfX =
688+ negate (toFloat x / 2)
689+
690+ halfY =
691+ negate (toFloat y / 2)
692+ in
693693 Internal.element
694694 Internal.asEl
695695 Internal.div
@@ -706,9 +706,28 @@ wrappedRow attrs children =
706706 ++ classes.wrapped
707707 )
708708 :: Internal.Attr
709− (Html.Attributes.style "margin-bottom" (String.fromInt (negate y) ++ "px"))
710− :: width fill
711− :: height fill
709+ (Html.Attributes.style "margin"
710+ (String.fromFloat halfY
711+ ++ "px"
712+ ++ " "
713+ ++ String.fromFloat halfX
714+ ++ "px"
715+ )
716+ )
717+ :: Internal.Attr
718+ (Html.Attributes.style "width"
719+ ("calc(100% + "
720+ ++ String.fromInt x
721+ ++ "px)"
722+ )
723+ )
724+ :: Internal.Attr
725+ (Html.Attributes.style "height"
726+ ("calc(100% + "
727+ ++ String.fromInt y
728+ ++ "px)"
729+ )
730+ )
712731 :: Internal.StyleClass Flag.spacing (Internal.SpacingStyle spaceName x y)
713732 :: []
714733 )
@@ -730,7 +749,7 @@ type alias Todo =
730749 el
731750 [ Element.explain Debug.todo
732751 ]
733− (text "Help! I'm being debugged!")
752+ (text "Help, I'm being debugged!")
734753
735754-}
736755explain : Todo -> Attribute msg