Forum Documentation

looking for documentation for prince-specific css values

jhodes
Hi,

I'm trying out Prince, mostly loving it, but keep looking around for what seems like the missing manual. :)

For example: http://www.princexml.com/doc/9.0/properties/float/ lists float values which prince can parse. Some look like they are Prince-specific.

Is there any documentation that describes the behavior of each value, e.g. "prince-snap"?

Thanks!

Jacob
mikeday
If we had more documentation I would be so happy. :D

Most of these new float values will be included in future CSS specifications, but the specification process takes time, and they are still working their way through the committee.

For now, we can break them down like this. First there are the easy ones:
float: none | left | right

Then some print-specific left/right equivalents for duplex page layouts:
float: inside | outside

Then footnotes:
float: footnote | inline-footnote | prince-column-footnote | prince-column-inline-footnote

Then page floats and column floats:
float: top | bottom | column-top | column-bottom

Those are simple enough, as they float to the top or bottom of the current page or column. But what if you wanted to create a magazine-style layout, and float to the right-hand corner of the current multi-column layout:
float: column-top-corner | column-bottom-corner

These can be combined with column-span property to put an image in the corner that spans two columns, for example.

There is an optional "next" modifier which you can use after these float values. For example, "top next" will float the block to the top of the next page.

There is also an optional "unless-fit" modifier which will not apply the float if the block fits in its natural position. For example, if you have a large image that happens to occur at the end of the page, it could force a page break and leave a gap at the end of the previous page. So you could float the image "top unless-fit" which would move it to the top of the next page unless it fits on the current page without causing a break and leaving a gap.

Finally we have the "prince-snap" value, which floats to the top or bottom of the page, whichever is closest. Phew!

Due to the ongoing specification process, these values are all subject to change. :)
jhodes
Hi Mike, thanks so much for this rundown. column-top-corner is awesome!