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