- From: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Date: Mon, 26 Nov 2012 13:28:28 +0900
- To: Simon Sapin <simon.sapin@kozea.fr>
- Cc: fantasai <fantasai.lists@inkedblade.net>, Michael Day <mikeday@yeslogic.com>, Peter Moulder <peter.moulder@monash.edu>, WWW Style <www-style@w3.org>
Simon Sapin <simon.sapin@kozea.fr> wrote on 2012/11/26 4:28:27
> Le 25/11/2012 19:36, MURAKAMI Shinyu a écrit :
> > Seems almost good,
> > but found a typo s/note generated/not generated/
>
> Fixed, thanks.
>
>
> > and I have one question:
> >
> > I think it is better not using min-content when the sum of outer
> > max-content is less than or equal to max box width (i.e., no line
> > wrapping necessary). In such case the used width should be
> > proportional to the respective outer max-content. In most cases of
> > page headers and footers, line wrapping is not often necessary and
> > calculating min-content is also unnecessary.
>
> I’m really not sure of the details of distributing space "proportionally
> to content". I just picked something so be improved on.
>
> I’m neutral on this change, but why do you want it? Is it because the
> results would be more aesthetic pleasing, or because of performance
> concerns in calculating min-content?
>
> In such cases the content would be short, so min-content would be quick
> to calculate. Also, the page size and headers typically do not change
> across pages, so layout results could be re-used. For these reasons I
> don’t think that performance is a strong argument. I’d rather not add
> more cases in the algorithm (which is complicated already), but I could
> still be convinced.
>
>
> What do you think of the balancing formula in other situations? (When
> some line wrapping or overflow is necessary.)
>
I thought that the margin boxes auto width algorithm would be similar to the table auto layout.
For example,
<style>
table { width: 100%; table-layout: auto }
td { border: 1px solid }
</style>
<table>
<tr>
<td id="A">Short text</td>
<td id="C">LongerTextButNotBreakable</td>
</tr>
</table>
CSS2.1 does not define exact algorithm of table auto layout, but in this case all major browsers have similar behavior: the width of A is always narrower than the width of C and the ratio of A's and C's widths is kept when the width of the table is widened. I think this behavior is natural and it would be applicable to the margin boxes auto width algorithm. (in the current css3-page editor's draft algorithm, only A's width is expanded because the weight for C is zero)
The algorithm would be: ... If the sum of A's and C's outer max-content is less than or equal to max box width, the used width for A and C is the respective max-content plus free space × weight ÷ sum of both weights, where free space is max box width minus A’s and C’s outer max-content width, and weight is the outer max-content width. ...
However, I agree with you that the algorithm should not be too complicated, and it will make sense that the margin box with unbreakable content has fixed width. I have no strong opinion now and I would like to hear others' opinion.
Regards,
Shinyu Murakami
Antenna House
Received on Monday, 26 November 2012 04:28:52 UTC