W3C home > Mailing lists > Public > www-style@w3.org > December 2014

Re: size property as a shorthand for width/height

From: Antony Kennedy <booshtukka@me.com>
Date: Mon, 01 Dec 2014 15:18:55 +0000
Cc: www-style@w3.org
Message-Id: <F0598822-5E5D-4284-A2E8-26A1DCFB96F5@me.com> (sfid-20141201_151902_314580_F09B67D0)
To: Marat Tanalin <mtanalin@yandex.ru>

> On 1 Dec 2014, at 15:10, Marat Tanalin <mtanalin@yandex.ru> wrote:
> 
> Hello.
> 
> What if we add the `size` CSS-property as a shorthand for `width`/`height` pair?
> 
> For example:
> 
>     .foo {size: 10px; }
> 
> would set both `width` and `height` properties to `10px`.
> 
> And:
> 
>     .bar {size: 2em 3em; }
> 
> would set `width` to `2em` and `height` to `3em`.
> 
> This can be (and is) implemented via a preprocessor, but preprocessors exist just to overcome current CSS shortcomings, while it makes sense to overcome them on CSS-itself level to make CSS itself more usable and self-contained in the long term.
> 
> Thanks.
> 

Size could easily be mistaken for font-size, border-size, or other things.

“dimensions” might be a better property name.

A
Received on Monday, 8 December 2014 17:55:40 UTC

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