min-width and max-width on <table>

Hi all,

I'd like to submit WebKit changes that add support for the CSS min-width
and max-width styles for the table tag. I wanted to make sure that there's
general agreement about my interpretation of the CSS 3 spec.

Currently, Firefox and Opera already support min-width and max-width on
the table tag. However, IE9 and WebKit browsers do not.

Web developers have asked for min-width and max-width on tables. For
example, see the Chromium and WebKit bugs listed below.

The CSS 2.1 spec states that min-width and max-width are undefined on
tables. Here's the exact line: "In CSS 2.1, the effect of 'min-width' and
'max-width' on tables, inline tables, table cells, table columns, and
column groups is undefined".

As far as I can tell, the CSS 3 spec does not specifically mention
min-width and max-width with regard to the table tag.

Both the CSS 2.1 and CSS 3 specs state that min-width and max-width apply
to "all elements but non-replaced inline elements, table rows, and row
groups," so I think the table tag is a reasonable candidate.

As a web developer, I would expect min-width and max-width to work on the
table tag like any other tag, as they do in Firefox and Opera. That is,
they would constrain the table's content width to the range defined by
min-width and max-width.

What do you all think? Does implementing min-width and max-width on the
table tag in WebKit sound reasonable?

Links:

Compatibility matrix for min-width and the table tag (at the bottom of the
page): https://developer.mozilla.org/en/CSS/min-width

Chromium bug: http://code.google.com/p/chromium/issues/detail?id=50169
WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=12396

CSS 2.1 min-width spec:
http://www.w3.org/TR/CSS2/visudet.html#propdef-min-width
CSS 3 min-width spec: http://www.w3.org/TR/css3-box/#min-max

Thanks!
Max Vujovic

Received on Monday, 9 January 2012 10:10:29 UTC