Re: Suggestion: Introduce new height property value for full fitting space

On Wed, Mar 12, 2014 at 7:13 AM, Axel Dahmen <brille1@hotmail.com> wrote:
> See here:
> http://stackoverflow.com/questions/15999282/css3-how-can-i-set-middle-div-to-maximum-height
>
>
> I suggest to introduce a new literal keyword to the “height” property.
>
> This new keyword is supposed to set the height of a box element to the
> maximum possible value after
> subtracting all the heights of sibling boxes from the viewport height, thus
> the box will exactly fit the
> viewport’s height.
>
> The minimum height of such box, however shall be the minimum height
> necessary to show its full content.
>
> I suggest the new height literal value to be named “fit”.
>
> If more than a single sibling box has the “fit” value assigned to its
> “height” property, and if there
> is still room left in the viewport after adding all of those boxes’ minimum
> heights plus their sibling
> boxes’ heights, then the remaining height shall be distributed between all
> “fit” boxes.
>
>
>
> This new property value would help creating dynamic web pages with dynamic
> heading and footer content.
>
> Without the new property value, both heading and footer boxed need a fixed
> height value to be assigned.
> But this will render it impossible to feed these boxes with dynamic content
> of different length or size
> (e.g. in the course of internationalization).

We have the 'fill' keyword
<http://dev.w3.org/csswg/css-sizing/#valuedef-fill0> that does this,
ignoring siblings.

If you want to pay attention to siblings, just use Flexbox.

~TJ

Received on Thursday, 13 March 2014 03:19:04 UTC