mdgriffith / design-discussion-elm-ui-2

A repo for discussing changes to Elm UI 2
17 stars 0 forks source link

Change to Floating numbers where it would make sense #18

Open lucamug opened 4 years ago

lucamug commented 4 years ago

Most properties can be described only as Integer now because, for example

px : Int -> Length

but browser are actually behaving differently if given non-integer values because the density of screen is getting higher and higher.

This can create unwanted behaviour, especially if these small discrepancy are adding up.

This is an example of an animation that is not smooth as it could be because the height can only be expressed with integer numbers:

https://ellie-app.com/8z6hqHxjtnra1

lucamug commented 4 years ago

This is a better example: https://ellie-app.com/8z77CXZD425a1