W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Device dimensions units proposal

From: w3c <w3c@maisqi.com>
Date: Fri, 23 Mar 2012 14:43:25 +0000
Message-ID: <4F6C8C0D.7040803@maisqi.com>
To: www-style@w3.org
Hello to all.
The draft at this point includes the "vw" and "vh" units, that are 
relative to the browser's viewport. They sure are useful, but I think 
that there's a need for units that are relative to the user's screen size.

Let's say I have a big picture to show on a browser. I know that users 
with a big-screen (1600x900, 1920x1080, etc) will be able to see it 
without a problem, but all others will have to scroll or see only a 
portion of it. If I could set a max-size relative to device width, let's 
say 95dw, browsers on smaller screen would show the image at the biggest 
size possible. Of course, users would have to maximize the browser, but 
I see no problem there.

This case could not be handled by the "vw" unit because that would 
resize the image whenever the user tweaked the window size. I don't see 
the point on that.

max-width:100% would not solve the problem easily, either, because that 
would force me to set all the image's parents to full (browser's window) 
width, what sometimes isn't possible.

I think this could be a good addition to the standard and I'm ready to 
advocate it. So, was I able to explain my point? Can I make it clearer?

Best regards,
Filipe Martins
Received on Saturday, 24 March 2012 00:18:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:13 UTC