[csswg-drafts] [css-sizing] percentage [max-]width|height and intrinsic sizes

MatsPalmgren has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-sizing] percentage [max-]width|height and intrinsic sizes ==
Background: 
https://lists.w3.org/Archives/Public/www-style/2015Dec/0117.html
I'm quoting @dbaron's post here verbatim for convenience:

> From: L. David Baron <dbaron@dbaron.org>
> Date: Tue, 8 Dec 2015 21:51:01 -0500
> To: Karl Dubost <kdubost@mozilla.com>
> Cc: www-style@w3.org
> Message-ID: <20151209025101.GA26911@pescadero.dbaron.org>
> 
> On Tuesday 2015-10-27 09:44 +0900, Karl Dubost wrote:
> > Gecko (Firefox) has a Webcompat issue related to the use of 
`max-width` inside `table`. I put an example on Codepen [1].
> > 
> > For Webcompat reasons with Blink and WebKit, we will probably need
 to modify Gecko code (see Bugzilla [2]). In the seeAlso section of 
this bug, you will find some of the reported Web Compat issues. 
> > 
> > What I would like to know is if the CSS specification needs to be 
changed to reflect the reality.
> [...]
> > Currently Blink and Safari are reducing the image so it fits the 
viewport. 
> > You can see this in recent Web Compat bugs
> > https://webcompat.com/issues/1838
> > https://webcompat.com/issues/1837
> > 
> > I summarized the issue in the webcompat space [4]. 
> 
> So the underlying behavior here that needs to be specified is (using
> css-sizing terminology) that when either 'width' or 'max-width' on a
> replaced element is a percentage, that element's min-content
> contribution is zero.  Note that given that this occurs for
> 'max-width', this needs to override the rule that the min-content
> contribution is determined by the specified size, since a replaced
> element with "width: 100px; max-width: 50%" has a min-content
> contribution of 0.
> 
> The relevant section of the specification is:
> http://dev.w3.org/csswg/css-sizing/#replaced-intrinsic
> 
> At least, that's the relevant specification assuming a relatively
> strict definition of replaced element.  This rule should not apply
> to form controls and similar things that aren't explained by CSS.
> It should only apply to things that do replaced element sizing such
> as images, plugins, videos, and iframes.
> 
> I'm not sure if we have a clear enough definition of replaced
> element, or whether we perhaps need two definitions.
> 
> -David
> 
> > [1]: http://codepen.io/anon/pen/rOdpdW
> > [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=823483
> > [3]: https://drafts.csswg.org/css2/visudet.html#propdef-max-width
> > [4]: https://github.com/whatwg/compat/issues/12
> 

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/765 using your GitHub 
account

Received on Friday, 25 November 2016 19:53:25 UTC