W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: [css-page-floats] First cleanup

From: Håkon Wium Lie <howcome@opera.com>
Date: Tue, 7 Apr 2015 18:12:59 +0200
Message-ID: <21796.523.175841.147449@opera.com>
To: Johannes Wilm <johanneswilm@vivliostyle.com>
Cc: www-style list <www-style@w3.org>, public-ppl@w3.org
Johannes Wilm wrote:

 > I have spent the last few weeks looking at the manuals of PrinceXML, the
 > Antennahouse Formatter, Håkon Wium Lie's CSS Figure Spec [1] and have
 > discussed with the Vivliostyle team what they would need from a page float
 > spec.
 > 
 > I have tried to add the most important points to the CSS Page Float spec
 > draft 

  http://dev.w3.org/csswg/css-page-floats/

It's good to see renewed interest in Page Floats; I believe the
approach taken fits well with the capabilities of CSS and the needs of
publishers.

I also undertand the need to reduce scope to tempt implementors.
However, it's important to support the most common use cases. THE use
case for page floats is an image spanning two columns, floating to the
top corner of the article. Like the random example found here:

  http://www.wildcatfund.org/ArticleSmallCat.jpg    

To achive this, one would write code like:

  article { columns: 3 }
  h1 { column-span: all }
  img { column-span: 2; float: top; float-defer-column: last }

This example is not possible to achieve in the current draft as
'column-span: <integer>' is not available. I understand that it can be
described in some other specification/level. However, as these
features are so commonly used together, I think it makes sense to
encourage implementors to treat them as a bundle by having them in the
same spec. It also makes it easier to write sample code and to do
maintenance in general.

Another simplficiation that has been made is to combine the proposed
'float-defer-page' and 'float-defer-column' into one property. While
I'm stingy on properties myself, there are several important use cases
where where you need to both defer to a certain page and a certain
column. For example, if you're making a 4-column newsletter where the
editorial should appear on page 2, spanning the middle 2 columns, you
would say:

  aside.editorial {
    float: top;
    float-defer-page: 1;
    float-defer-column: 1;
    column-span: 2;
  }

Or, say you want a certin do to go into the outer column on the third
page:

  #ad1 {
    float: top;
    float-defer-page: 2;
    float-defer-column: outside;
  }

These are quite common use cases once you start making page-based
publications. So, I suggest that the float-defer property is de-combined.

The inside/outside keywords on float have also been removed in the
draft. They're quite useful, and to me they are core to page floats.
Using them, you can make sidenotes like in this document:

  http://css4.pub/2015/textbook/somatosensory.pdf
  http://css4.pub/2015/textbook/somatosensory.html

In any case, they will be available from here:

  https://figures.spec.whatwg.org/#floating-inside-and-outside-pages

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Tuesday, 7 April 2015 16:13:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC