W3C home > Mailing lists > Public > www-style@w3.org > August 2007

Re: [Media Queries] aspect ratio

From: Håkon Wium Lie <howcome@opera.com>
Date: Wed, 22 Aug 2007 00:40:42 +0200
Message-ID: <18123.27114.749338.38455@gargle.gargle.HOWL>
To: Spartanicus <mk98762@gmail.com>
Cc: www-style@w3.org

Also sprach Spartanicus:

 > >If this is the case, the code could be made more
 > >intuitive by adding keywords. For example:
 > >
 > >  @media screen and (aspect-ratio: portrait) 
 > >  @media screen and (aspect-ratio: landscape)
 > >
 > >Or just:
 > >
 > >  @media screen and (aspect: portrait) 
 > >  @media screen and (aspect: landscape)
 > >
 > >Or even:
 > >
 > >  @media screen and (portrait) 
 > >  @media screen and (landscape)
 > 
 > I don't understand how these keywords would work, what aspect ratio or
 > aspect ratio range would qualify as portrait or landscape?

If the height of the viewport is greater than the width of the viewport, it's portrait.

If the height of the viewport is smaller than the width of the viewport, it's landscape.

If their're equal, let's flip a coin or something.

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Tuesday, 21 August 2007 22:40:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:52 GMT