Title: Proposals for the future of CSS Paged Media
Shortname: css-page
Level: 4
Group: csswg
Status: UD
Work Status: exploring
ED: https://drafts.csswg.org/css-page-4/
Editor: Daniel Glazman, Disruptive Innovations
Abstract: A list of issues with the current CSS page model, and possibly directions to explore for fixing it.
The CSS 3 Page Model
This section is informative.
The current Page Model,
as described in CSS3 Module: Paged Media [[!CSS3PAGE]],
is the following one:
the printable area of a page,
the page box,
is made of one page box itself divided in four areas:
The CSS3 Page Model
1. the page margin;
that area is itself divided into 16 page-margin boxes
(@top-left-corner, @top-left, @top-center, etc. )
alt="CSS 3 page-margin boxes">
The 16 page-margin boxes
(with highlight of 3 of them)
2. the page border
3. the page padding
4. and finally the page area
containing the boxes generated by
the flow of the main contents of the document.
It's is possible to flow content,
for instance page headers and footers or footnotes,
into a page-margin box
using features introduced by the
CSS Generated Content for Paged Media Module [[!CSS3GCPM]].
It is also possible to define multiple page templates for a single document
using the @page at-rule
that allows to select the
first page, left pages, right pages or named pages of a paginated flow.
If this page model allowed the publishing industry to adopt HTML and CSS as pivot formats,
it starts showing its limits for the following reasons:
* the 16 page-margin boxes are an extension
of the print features offered by desktop browsers.
Desktop browsers usually offer control over 6 page-margin boxes only.
Only one desktop browser claims implementation
of the page model described above in the fourteen last years.
The other desktop browsers' control over the 6 page-margin boxes
is then not achieved through the cascade of CSS UA stylesheets.
* no editing environment available on the market
and in particular Wysiwyg text editor
(for instance like Microsoft Word)
implements such a box model.
* it's not possible with the current model to position headers and footers
(for instance the HTML5 header and footer elements)
arbitrarily in the page area.
* the ''@page'' at-rule currently allows nested at-rules
only for the definition of page-margin boxes.
Similarly, the set of CSS properties applicable to a page box
is limited and it is impossible in this model to use
CSS Regions Module Level 3 [[!CSS3-REGIONS]]
to flow content into a given predefined area of a page,
exclude an area from the page using
CSS 3 Exclusions and Shapes Module [[!CSS3-EXCLUSIONS]],
lay out the page area into a grid using
CSS Grid Layout [[!CSS3-GRID-LAYOUT]]
or using ''@slot'' rules
that were discussed multiple times by the CSS Working Group
in the recent past.
The successful electronic book editing environment of Apple Inc.,
iBooks Author,
already allows ''@page'' rules to specify
arbitrary slots,
arbitrary exclusions and shapes,
and extends the list of applicable properties;
most of its advanced layout capabilities are based on these features.
* the ''@page'' rule of CSS 2.1 [[!CSS21]]
is intended for use on print media,
not dynamic media.
The spread of complex HTML-based slideshows and electronic book viewers
has shown that the Page Model should also apply to screen media and alike.
* ++TBD
Privacy Considerations
No new privacy considerations have been reported on this specification.
Security Considerations
No new security considerations have been reported on this specification.