@@ -1538,13 +1538,21 @@ type Orientation
15381538classifyDevice : { window | height : Int, width : Int } -> Device
15391539classifyDevice window =
15401540 { class =
1541− if window.width <= 600 then
1541+ let
1542+ shortSide =
1543+ if window.width < window.height then
1544+ window.width
1545+
1546+ else
1547+ window.height
1548+ in
1549+ if shortSide <= 600 then
15421550 Phone
15431551
1544− else if window.width > 600 && window.width <= 1200 then
1552+ else if shortSide > 600 && shortSide <= 1200 then
15451553 Tablet
15461554
1547− else if window.width > 1200 && window.width <= 1800 then
1555+ else if shortSide > 1200 && shortSide <= 1800 then
15481556 Desktop
15491557
15501558 else