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

[css-position] Position shorthand

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 28 Apr 2016 19:31:47 -0700
Cc: www-style@w3.org
Message-Id: <D694D7C8-459A-4F5A-80B2-A6FEACABD6B5@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>


On Apr 27, 2016, at 11:32 PM, Brad Kemper <brad.kemper@gmail.com> wrote:

>> But for top/left/right/bottom we were thinking of using 'offset' as the
>> prefix for the logical properties (and hence 'offset' as the shorthand
>> that sets all of them),
> 
> I like the idea, but 'offset' seems less than ideal. What if 'position' was the shorthand and the prefix? Like 'position: absolute 0 auto 0 0'?

And actually, by sheer coincidence, I happened to stumble across a PostCSS plugin called "Short", which used this syntax. 

https://github.com/jonathantneal/postcss-short/blob/master/README.md

It also includes using '*' in shorthands to mean "don't change the value that would normally be in this position", which I find pretty intriguing and would be useful for shorthands in general (we could use some other token if that one is problematic). 
Received on Friday, 29 April 2016 02:32:17 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:58 UTC