A test suite of ~1.6k layout tests was written(whew!). All of these tests pass on Chrome, Firefox, Safari, Edge, and IE11.
Font.lineHeight
has been removed. Instead,spacing
now works on paragraphs.Element.empty
has been renamedElement.none
to be more consistent with other elm libraries.Device
no longer includeswindow.width
andwindow.height
. Previously every view function that depends ondevice
was forced to rerender when the window was resized, which meant you couldn't take advantage of lazy. If you do need the window coordinates you can save them separately.- Fewer nodes rendered - So, things should be faster!
fillBetween
has been replaced byElement.minimum
andElement.maximum
.
So now you can do things like
view =
el
[ width
(fill
|> minimum 20
|> maximum 200
)
]
(text "woohoo, I have a min and max")
This is a MAJOR change.
------ Changes to module Element - MAJOR ------
Added:
maximum : Int -> Element.Length -> Element.Length
minimum : Int -> Element.Length -> Element.Length
none : Element.Element msg
Removed:
empty : Element.Element msg
fillBetween : { min : Maybe.Maybe Int,
max : Maybe.Maybe Int
} -> Element.Length
fillPortionBetween : { portion : Int,
min : Maybe.Maybe Int,
max : Maybe.Maybe Int
} -> Element.Length
Changed:
- type alias Device =
{ width : Int,
height : Int,
phone : Bool,
tablet : Bool,
desktop : Bool,
bigDesktop : Bool,
portrait : Bool
}
+ type alias Device =
{ phone : Bool,
tablet : Bool,
desktop : Bool,
bigDesktop : Bool,
portrait : Bool
}
------ Changes to module Element.Background - MAJOR ------
Added:
uncropped : String -> Element.Attribute msg
Removed:
fittedImage : String -> Element.Attribute msg
------ Changes to module Element.Font - MAJOR ------
Removed:
lineHeight : Float -> Element.Attr decorative msg
------ Changes to module Element.Input - MINOR ------
Added:
type OptionState = Focused | Idle | Selected