Re: [css-grid][css-align] Intrinsic size of replaced elements, and no shrink-to-fit algorithm

On Tue, May 12, 2015 at 9:18 AM, François REMY
<francois.remy.dev@outlook.com> wrote:
> The cross-browser issue is that the <video>
> elements is sized % the video content in Firefox,

I'm not sure what this means.

> The issue, though, is relevant to the working group because I’m not sure
> whether or not I should be “fixing” the bug by forcing one behavior or
> another. The problem is that the <img> or <video> element with “auto-height
> auto-width” have a default size. If that size is bigger than the size of the
> cell, the CSS Alignment specs tells us not to shrink-to-fit, resulting in
> overflow. However, if I enforced a size on the element, its content would
> properly auto-fit inside its new size, even if it’s smaller than what it
> prefers to be sized.
>
> So, my question is: should I do like if those replaced elements “which can
> shrink-to-fit” didn’t have any intrinsic size at all when doing my layout
> pass? If yes (or no), should I accept to shrink-to-fit them if it turns out
> the cell they’re in is too small for them? I’m not sure where to look at for
> this kind of three-or-more-specs-involved behaviors.

It sounds like you mean the <img> or <video> is actually a grid item?

Are you looking at
http://dev.w3.org/csswg/css-align/#justify-self-property for the
definition of "stretch"? Note that this is different than the
justify-content definition.  In particular, it'll shrink too-big
things.

~TJ

Received on Friday, 15 May 2015 20:45:27 UTC