- From: Håkon Wium Lie <howcome@opera.com>
- Date: Tue, 17 Sep 2013 00:04:08 +0200
- To: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Cc: www-style@w3.org
MURAKAMI-san wrote: > > However, if there isn't enough space in the current page/column, the > > float must be moved to the next page/column anyway. So, I don't > > understand what effect the value has. > > The 'auto-next' is the default behavior of AH pages floats, > and I thought that 'float-defer-column: none' would be the same. > > http://antennahouse.com/CSSInfo/float-extension.html#axf.float-move > Initial: auto > auto: Same as keep if float-y is none, same as auto-next otherwise. > > 'float-y is none' means this float is not a page float. I see. It's a float, but not a page float. > > It seems similar to the 'unless-room' value found here: > > > > http://www.w3.org/TR/css3-gcpm/#float-modifiers > > > > However, the effect of 'unless-room' is that it turns on floating; if > > there is enough room, the element will not be floated. But 'auto-next' > > only applies to floats, so it it is not the same as 'unless-room'. > > However 'auto-next' can apply to non-page floats. > > .figure { > -ah-float: left auto-next; > } > > This float is almost same as normal 'float: left', > but when there is no sufficient space in the current > page/column and a page/column break occurs at before the > float, the blank space remains with normal 'float: left' > (the text following the float moves to the next page > together with the float) and no such blank space remains > with 'auto-next'. Understood. > This effect is similar to the 'float: snap(0)', > although 'auto-next' cannot change non-float to a float > and cannot change non-page float to a page-float. So, in your example, .figure remains a float, but is not considered a page float, even if it appears at the top of the column? I'd probably consider it a page float at that stage, but that's more a question of terminology than functionality. > One question: > > <div style="margin-left: 3cm; margin-right: 3cm"> > ... > <figure style="float: snap(0); width: 100%;"> > ... > </figure> > </div> > > If snap(0) makes itself a page float conditionally, > the width of the figure also will be changed? > (When this figure is a page float, the 100% width is > the column/page width and the margin-left/right > of the div does not affect the width of the page float.) Let's see. If the figure is in a multicol element, 100% refers to the column width -- this is the case both for page floats and other elements, so there should be no change. If the figure had been turned into a page float with the page as a reference, the width would change. In the current ED syntax, one can epress that the page is the reference with: .figure { column-span: page } However, when using 'column-span', one should expect the width to change. So, I'm fairly happy about using 'column-span' for this. The question then becomes, is it possible for snap() to change the referece from column to page? For example, what does this mean?: .figure { float: snap(0); width: 100%; column-span: page } We could define it to mean: if there's room, the element should remain in the normal flow. If the element would cause a column/page break, it is turned into a page float and 'column-span: page' then has effect -- the element escapes its <div> parent and uses the wider page as a reference. Does this make sense? (In Opera's implementation, page floats only work in multicol elements. So, our implementation of 'snap()' will never lead to changes in width.) -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Monday, 16 September 2013 22:04:44 UTC