Re: CSS Printing Extensions
Greg Kostello wrote:
> While at first blush, the "page-break-after: never" seems like an
> obvious extension, I would suggest a different, widely accepted
> stylistic attribute: "keep-with-next" and "keep-with-previous". These
> give you the same functionallity needed for the 'page-break-after:
> never', as well keeping headlines together in a multi-column layout.
I wholeheartedly agree that 'keep-with-' is needed and should be part
of the CSS spec. It would be more useful than "page-break -...: never".
But does keep-with preclude 'never' as a page-break value? There may be
times when one element relates to a preceding or succeeding element in
such a way that being in a separate column would not impact the
relationship, but being on a separate page would. Also, this is a
'Printing Extensions' spec. Keep-with is wider in scope.
There are other CSS properties that are needed before quality printing
can occur. One is 'keep-together':
Value: auto | column | page
Applies to: block level elements
Percentage values: N/A
auto: break as necessary
column: keep the entire element in one column if possible
page: keep the entire element on one page if possible
You could encompass any number of elements that should be kept together
within a 'keep-together' DIV element. But more importantly,
keep-together would keep a paragraph or headline from breaking across
columns or pages. For example, what happens when you have
'keep-with-next' set on a multi-line heading and only the first line of
the heading fits at the bottom of the page? Answer: you get the first
line at the bottom of one page and remainder at the top of another.
Setting the keep-together attribute of the heading to 'column' or
'page' would avoid this.
Properties are also needed for widow/orphan control. One possibility is
'orphan-lines' and 'widow-lines':
Applies to: all elements
Percentage values: N/A
The number of lines at the beginning (orphan-lines)
or end (widow-lines) of a block of text that must not break
across columns or pages.
Without orphan and widow control, it is possible to have a single line
of a text block at the bottom or top of columns or pages - a very ugly
A value of 2 lines is 'normal' for orphan/widow control, but why limit
the property to on | off?