@@ -1536,13 +1536,21 @@ type Orientation
15361536classifyDevice : { window | height : Int, width : Int } -> Device
15371537classifyDevice window =
15381538 { class =
1539− if window.width <= 600 then
1539+ let
1540+ shortSide =
1541+ if window.width < window.height then
1542+ window.width
1543+
1544+ else
1545+ window.height
1546+ in
1547+ if shortSide <= 600 then
15401548 Phone
15411549
1542− else if window.width > 600 && window.width <= 1200 then
1550+ else if shortSide > 600 && shortSide <= 1200 then
15431551 Tablet
15441552
1545− else if window.width > 1200 && window.width <= 1800 then
1553+ else if shortSide > 1200 && shortSide <= 1800 then
15461554 Desktop
15471555
15481556 else
@@ -1555,7 +1563,6 @@ classifyDevice window =
15551563 Landscape
15561564 }
15571565
1558−
15591566{-| When designing it's nice to use a modular scale to set spacial rythms.
15601567
15611568 scaled =