git.iko.soy/typeable/elm-ui
on master help sign in
Merge pull request #91 from RosarioPulella/master
b65a490Matthew Griffith
src/Element.elm+11−3
@@ -1538,13 +1538,21 @@ type Orientation
1538classifyDevice : { window | height : Int, width : Int } -> Device
1538classifyDevice : { window | height : Int, width : Int } -> Device
1539classifyDevice window =
1539classifyDevice window =
1540 { class =
1540 { class =
1541+ let
1542+ shortSide =
1541− if window.width <= 600 then
1543+ if window.width < window.height then
1544+ window.width
1545+
1546+ else
1547+ window.height
1548+ in
1549+ if shortSide <= 600 then
1542 Phone
1550 Phone
1543
1551
1544− else if window.width > 600 && window.width <= 1200 then
1552+ else if shortSide > 600 && shortSide <= 1200 then
1545 Tablet
1553 Tablet
1546
1554
1547− else if window.width > 1200 && window.width <= 1800 then
1555+ else if shortSide > 1200 && shortSide <= 1800 then
1548 Desktop
1556 Desktop
1549
1557
1550 else
1558 else