W3C home > Mailing lists > Public > www-style@w3.org > October 2015

[web compat] max-width and intrinsic sizes in a table scenario

From: Karl Dubost <kdubost@mozilla.com>
Date: Tue, 27 Oct 2015 09:44:52 +0900
Message-Id: <9E5A56D8-12DD-4DBE-A0F9-51CF26FCED62@mozilla.com>
To: www-style@w3.org

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.

The CSS specification for `max-width` [3] currently says:

    Specifies a percentage for determining the used value. 
    The percentage is calculated with respect to the width 
    of the generated box's containing block. If the containing 
    block's width is negative, the used value is zero. If the 
    containing block's width depends on this element's width, 
    then the resulting layout is undefined in CSS 2.2.


    In CSS 2.2, the effect of 'min-width' and 'max-width' on 
    tables, inline tables, table cells, table columns, and 
    column groups is undefined.

Currently Blink and Safari are reducing the image so it fits the viewport. 
You can see this in recent Web Compat bugs

I summarized the issue in the webcompat space [4]. 

[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

Karl Dubost, Mozilla
Received on Tuesday, 27 October 2015 00:45:56 UTC

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