- From: Håkon Wium Lie <howcome@opera.com>
- Date: Tue, 4 Jun 2013 01:16:25 +0200
- To: Morten Stenshorne <mstensho@opera.com>
- Cc: Bert Bos <bert@w3.org>, Simon Sapin <simon.sapin@exyr.org>, www-style@w3.org
Morten Stenshorne wrote: > > Bert Bos <bert@w3.org> writes: > > Apart from this max(), the W is indeed the same in all three cases, so > > how about showing just the three cases for N, like in your version, but > > purely declaratively, and then the W separately: > > > > if column-width = auto then > > N := column-count > > else if column-count = auto then > > N := max(1, floor((U + column-gap)/(column-width + column-gap))) > > else > > N := min(column-count, max(1, > > floor((U + column-gap)/(column-width + column-gap)))) > > > > And: > > > > W := max(0, ((U + column-gap)/N - column-gap) > > Looks good. Done. http://dev.w3.org/csswg/css-multicol/#pseudo-algorithm > >> > - these assumptions: > >> > -- that the block direction is unconstrained > >> > -- that no column breaks are added through style sheets > >> > >> The used value of column-width isn't affected by breaks or block > >> direction restrictions, but used column-count may be, but that > >> depends on what "used" means in this case. The column-count property > >> has the following phases: > >> > >> - Specified/computed (whatever the stylesheet or style attributes > >> says) > >> > >> - After running the pseudo algorithm > >> > >> - Actual layout > >> > >> Consider this example: > >> > >> <body style="width:600px;"> > >> <div style="column-width:200px; column-gap:0; height:2em; > >> line-height:1em;"> line<br> > >> line<br> > >> line<br> > >> line<br> > >> line<br> > >> line<br> > >> line<br> > >> </div> > >> </body> > >> > >> The computed value of column-count is auto. > >> The pseudo algorithm resolves column-count to 3. > >> Layout ends up with 4 columns, due to restricted height. > >> > >> What if we define it so that *used* column-count in the example above > >> is 3, while *actual* column-count is 4 [1]? If we do that, you can > >> remove the assumptions. > >> > >> [1] http://www.w3.org/TR/CSS21/cascade.html#value-stages > > > > That sounds attractive. Does it influence anything else apart from the > > terminology in the spec? > > No, it shouldn't. I'd like to get rid of the assumptions, too, but I'm unsure if the replaced text is simple. Perhaps it could be expressed with something like: "The /used value/ for for /column-count/ is calculated without regard for explicit column breaks or constrained column lengths, while the /actual value/ takes these into consideration." And then proceed with the example? -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Monday, 3 June 2013 23:17:09 UTC