W3C home > Mailing lists > Public > www-style@w3.org > August 2011

display-inside/display-outside or layout/position (RE: [css3-regions] content:flow-from() vs. flow-from)

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Thu, 11 Aug 2011 14:30:18 +0000
To: François REMY <fremycompany_pub@yahoo.fr>, Øyvind Stenhaug <oyvinds@opera.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E5398569284120ECF63@TK5EX14MBXC218.redmond.corp.microsoft.com>
± From: François REMY [mailto:fremycompany_pub@yahoo.fr] 
± Sent: Thursday, August 11, 2011 7:08 AM
± 
± I kinda like your proposal to (virtually) merge "display-outside" and "position" but I don't 
± like the "position-offset" property. The "top" and "left" properties did the job for years 
± in conjuction with "position: 
± relative" and nobody has been confused about it yet. What about "position: 
± relative inline;" and "position: relative block" that would act the same way as "display: 
± inline/block; position: relative" now (using top/left as the offset source)?

Relative positioning applies to everything (almost), so combining it with any other property doesn't seem natural.

I am not sure how relative position ended up where it is now - in the same property with absolute positioning. My guess is because it shares top/right/bottom/left values with absolute, and creating a separate set of properties just for relative offset wouldn't be very elegant...

± If you want to "offset" the position of an element regardless of its "position" and 
± "display" state, you can already use "transform: translate()" 
± for that kind of use. In some cases, tweaking "margin" could do the trick, too. Why is there 
± a need to introduce a new property here?

This is a very good point. Relative positioning is a visual-only shift, and now there is a different, more powerful way to do the same. If 'position' were used to specify inline/block/etc., a separate property for relative positioning is simply not needed - transform is better.

There is another use of 'position:relative' though - making something a containing block for its absolute descendants. There would have to be a new way to create a positioning containing block. If "transform:translate(0,0)" or "transform:scale(1)" does it that's fine, although I wouldn't mind having an explicit way to just do that - it is used a lot, and pretending to position something just for the purpose of creating a coordinate system for children is kinda silly.

Alex


Received on Thursday, 11 August 2011 14:30:48 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:43 GMT