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

[css-align] Stretchable block-level and abspos boxes

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 15 Dec 2014 18:04:40 -0800
Message-ID: <548F9338.5070801@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
Tab and I just checked in some fixes to CSS Box Alignment that
allow shrinkwrapped abspos and block-level elements to respond
to 'stretch' by using the auto-width formula for non-replaced
block-level boxes. (Note the default alignment value is 'auto'.)

We think this is nice, straightforward, and sensible. You can,
for example, now precisely fill the containing block in these
cases, without calc():

   table { margin: 3em; justify-self: stretch; }
   /* stretch small, normally shrinkwrapped table to fill space */

   img { position: absolute;
         left: 25%; right: 15em;
         justify-self: stretch; }
   /* stretch replaced abspos element to fill offset area */

Replaced absposes don't stretch to fill offsets normally:

[The previous spec had some statements that treated 'stretch'
like 'start' in these cases.]

Received on Tuesday, 16 December 2014 02:05:19 UTC

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