W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css3-page] Add way for webpage to signal UA to disable default footer/header

From: Simon Sapin <simon.sapin@exyr.org>
Date: Sun, 17 Mar 2013 22:27:54 +0100
Message-ID: <5146355A.7010302@exyr.org>
To: Julian Viereck <julian.viereck@googlemail.com>
CC: spec:w3c:style <www-style@w3.org>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, Robert O'Callahan <robert@ocallahan.org>
Le 17/03/2013 22:03, Julian Viereck a écrit :
> How about this (only slightly different to previous raised approach):
>
>     Assume there is at least one margin-box defined in the document. The
> margin-box might have `content: none`. Then:
>
>     - the UA should disable it's default header/footer but let the user
> enable them if wanted
>     - the UA should provide a way to disable all the margin-boxes defined
> on the page. This might be done by using a checkbox "Ignore document
> specify headers and footers".
>
> With this, there is no need for an extra "disable the margin-boxes by
> default" flag like 'nomarginboxes'.
>
> Problem: What is a "document". E.g. the user might select only a range
> of pages to be printed - is a "document" then only the selected pages OR
> all the possible pages that can be printed?

The general idea sounds good to me, I’ll propose it during the next conf 
call.

In the details: I suggest the criteria being based on margin *rules* in 
stylesheets rather than on page-margin boxes.

More precisely: whether any stylesheet with author origin contain a 
syntactically valid margin at-rule, regardless of whether a page-margin 
box is generated. (eg. 'content' might compute to 'none', or the @page 
selector might never match.)

(Author origin as opposed to user agent or user origin:
http://www.w3.org/TR/CSS21/cascade.html#cascade
not same-origin policy.)

This criteria expresses authors’ intent of controlling headers and 
footers while staying simple, and not affected if only some pages are 
printed.

I’m less sure about this point:
Margin at-rules are only considered for this criteria if they are *not* 
inside a conditional rule (@media, @supports, …) whose condition 
evaluates to false, and if they are *not* in a stylesheet applied with a 
condition (Media Queries in @import or <link>) that evaluates to false.

(This does not force UAs to download stylesheets or parse rules that do 
not otherwise apply.)

-- 
Simon Sapin
Received on Sunday, 17 March 2013 21:28:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT