W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: New CSS declaration for width and height

From: Rachel Nabors <rachelnabors@gmail.com>
Date: Mon, 25 Apr 2016 15:23:54 +0000
Message-ID: <CAPFA0t0ajg3otFOtZLqnrKU5WUZNMAZt9BbF5n6nZf8aXp9m2Q@mail.gmail.com>
To: Matthew Robb <matthewwrobb@gmail.com>, Marat Tanalin <mtanalin@yandex.ru>
Cc: www-style list <www-style@w3.org>, Sebastian Zartner <sebastianzartner@gmail.com>, Giovanna Ruiu <giovannaruiu6@gmail.com>, Brad Kemper <brad.kemper@gmail.com>
I've been meaning to request aspect ratios for elements for awhile now.
Currently to make responsive sprited elements I have to do the padding hack
(padding percentages being based on width) on a pseudo element inside. It's
grossly over complicated.

I am all about a way to set something's aspect ratio, which would also
allow people to set height to equal width (perhaps the keyword "square"
could be used!). It's would be useful in many more situations.
On Wed, Apr 20, 2016 at 6:29 AM Matthew Robb <matthewwrobb@gmail.com> wrote:

> It would be great if size could be tied into aspect ratio. Then height and
> width become long forms of size sub properties and/or aliases for size-x
> and size-y.
> On Apr 19, 2016 6:19 PM, "Marat Tanalin" <mtanalin@yandex.ru> wrote:
>
>> 20.04.2016, 00:50, "Sebastian Zartner" <sebastianzartner@gmail.com>:
>> > Note that there were already earlier discussions about constraining
>> width and height:
>> > https://lists.w3.org/Archives/Public/www-style/2014Dec/0004.html
>> > https://lists.w3.org/Archives/Public/www-style/2014Dec/0290.html
>> > https://lists.w3.org/Archives/Public/www-style/2012Sep/0034.html
>> > https://lists.w3.org/Archives/Public/www-style/2011Aug/0562.html
>>
>> There is also a proposal about the `size` shorthand at WICG forum:
>>
>> https://discourse.wicg.io/t/1160
>>
>> There is also a PostCSS plugin emulating the feature:
>>
>> https://github.com/postcss/postcss-size
>>
>> --
Curator of Web Animation Weekly
Speaking & Workshops
• Apr 05 –06 SmashingConf, San Francisco
• Apr 21 Frontend Masters, online, CSS Animations and Transitions Master
Class
• May 18 –20 Front-Trends Keynote, Warsaw
• Jun 01 CSSconf Nordic, Oslo
Received on Monday, 25 April 2016 15:24:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC