@@ -1,31 +1,27 @@
1−module Main exposing (main)
1+module WeirdCentering exposing (main)
22
3−import Browser
4−import Element
5−import Element.Background as Background
6−import Element.Input as Input
7−import Html exposing (Html, button, div, text)
8−import Html.Events exposing (onClick)
3+import Html exposing (Html)
4+import Testable.Element exposing (..)
5+import Testable.Element.Background as Background
96
107
11−main : Html msg
128main =
13− Element.layout [] <|
14− Element.column []
15− [ Element.text "Example with centerX:"
16− , Element.row
17− [ Element.width Element.fill ]
18− [ Element.row [ Element.centerX, Background.color <| Element.rgb255 0 200 0 ]
19− [ Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
20− , Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
9+ layout [] <|
10+ column []
11+ [ text "Example with centerX:"
12+ , row
13+ [ width fill ]
14+ [ row [ centerX, Background.color <| rgb 0 1 0 ]
15+ [ paragraph [ width shrink ] [ text "Hello world" ]
16+ , paragraph [ width shrink ] [ text "Hello world" ]
2117 ]
2218 ]
23− , Element.text "Example without centerX:"
24− , Element.row
25− [ Element.width Element.fill ]
26− [ Element.row [ Background.color <| Element.rgb255 0 200 0 ]
27− [ Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
28− , Element.paragraph [ Element.width Element.shrink ] [ Element.text "Hello world" ]
19+ , text "Example without centerX:"
20+ , row
21+ [ width fill ]
22+ [ row [ Background.color <| rgb 0 1 0 ]
23+ [ paragraph [ width shrink ] [ text "Hello world" ]
24+ , paragraph [ width shrink ] [ text "Hello world" ]
2925 ]
3026 ]
3127 ]