Re: [css-page-floats] First cleanup

On Tue, Apr 7, 2015 at 10:01 PM, Håkon Wium Lie <howcome@opera.com> wrote:

> Johannes Wilm wrote:
>
>  > > 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.
>  >
>  > I can also see that Inside/outside can be helpful, but this is for page
>  > based media in general, not specific for floats. And from what I can
> tell,
>  > the same effect can be achieved by setting separate styles for @page
> :right
>  > and @page :left, right?
>
> That's different. Floting inside/outside lets you do things like:
>
>   aside {
>     float: outside;
>     float-offset: -80mm;
>     width: 75mm;
>   }


And that would be different from

aside {
  float-offset: -80mm;
  width: 75mm
}

@page:right {
  aside {
   float: right;
  }
 }

@page:left {
  aside {
   float: left;
  }
 }

in the cases when the aside ends up being floated to a different page than
where the float reference is?


>
> To float sidnotes into the outside column.
>
>  > > From what I can tell, for sidenotes one would need very specific
> placement
>  > > rules, which for European text would start something like:
>  >
>  > 1. Sidenotes are placed to the right or left of their float reference so
>  > that they are always on the outside part of the page.
>  > 2. If they cannot be placed where they were placed according to 1
> because
>  > another sidenote is already covering that part of the margin, they will
>  > need to be me moved below the last sidenote that was placed in that
> margin.
>  > 3. If a sidenote on a page hits the bottom edge, it needs to be moved
> up so
>  > that it fits on the page in its entirety, which means that all previous
>  > sidenotes on the same page may need to be moved further up.
>  > 4. 3 has to be repeated for every extra sidenode that would otherwise
> have
>  > to be placed beyond the bottom edge of the page
>  > 5. If 3/4 result in the first sidenote on the page to be moved further
> up
>  > than where the body text of the page starts, the movements done in 3/4
>  >  have to be reverted until the first side node fits on the page and all
>  > side nodes that then fall below the bottom edge of the page will have
> to be
>  > moved to the next page instead.
>  > 6. If one single side node is taller then the entire height of the part
> of
>  > the page where the body text is placed, then break it into several
> pieces,
>  > according to principle X.
>  >
>  > And so on. This is a level of complexity that will be interesting to
> some
>  > who are specifically into print (like us), but possibly not to everyone
>  > else to the same degree. That's why the thought was to try to get some
> of
>  > the more fundamental building blocks into this spec so that the more
>  > complex things can be added at a later stage on top of it. In the
> meantime
>  > they can be achieved by combining Javascript with CSS on the pages where
>  > they are really needed.
>
> Can't we just say that "inside" and "outside" are alises for "left"
> and "right", depending on which page the float ends up on?
>


Ok, so inside/outside would be mapped to left/right, which again are mapped
to inline-start/end in horizontal writing modes and block-start/end in vertical
writing modes, correct? I can add that, if it's not to be more complex.


>
>
> Prince and AntennaHouse have implemented these, so I don't think it's
> awfully hard. (Their programmers may correct me on this.)
>

I implemented sidenodes myself using Javascript in BookJS, and I covered
points 1-4 but not 5 and 6 there. It's not impossible to do, but it means
implementing a lot of logic and even different book styles may decide to do
them differently (for example: sidenodes may placed next to footnotes or
they may end where the body text ends). If the outside/inside is meant to
make the creation of sidenodes possible, I'm afraid that won't be enough.




>   http://www.princexml.com/doc/properties/float/
>   http://www.antennahouse.com/product/ahf60/docs/ahf-float.html
>
> -h&kon
>               Håkon Wium Lie                          CTO °þe®ª
> howcome@opera.com                  http://people.opera.com/howcome
>
>

Received on Tuesday, 7 April 2015 20:36:58 UTC