- From: Simon Sapin <simon.sapin@exyr.org>
- Date: Tue, 04 Jun 2013 16:33:44 +0900
- To: Håkon Wium Lie <howcome@opera.com>
- CC: Morten Stenshorne <mstensho@opera.com>, Bert Bos <bert@w3.org>, www-style@w3.org
Le 04/06/2013 08:16, Håkon Wium Lie a écrit : > > >> > - 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? I agree: I’d really like to get rid of these assumptions, because the current spec is just undefined when they don’t hold. Note for editing: these assumptions are repeated twice: just before the pseudo algorithm, and at the beginning of section 3. "The number and width of columns". This algorithm determines N and W. We can call these the used values of the column-count and column-width properties. The layout of the element’s content is done by generating column boxes of width W that are containing blocks for the content. The content is distributed among column boxes based on height constraints, forced breaks, and column balancing. The number of columns boxes that end up with any content may be lower or higher than N, and does not need to be the (used/actual/…) value of a CSS property. I believe that making the distinction between these two numbers allows getting rid of the algorithm’s assumptions. -- Simon Sapin
Received on Tuesday, 4 June 2013 07:34:16 UTC