Re: [csswg-drafts] [css-page][css-env] Expose unprintable areas via CSS (#11395)

The CSS Working Group just discussed `[css-page][css-env] Expose unprintable areas via CSS`, and agreed to the following:

* `RESOLVED: Don't use env() for this. Use an @page descriptor roughly as proposed by dholbert; work out details in the issue.`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> TabAtkins: Proposal to add new env() variables for the unprintable area of the page<br>
&lt;fantasai> TabAtkins: They will be zero on a normal screen display<br>
&lt;fantasai> TabAtkins: But when printing, they would show how far you need to be to ensure stuff is printed<br>
&lt;fantasai> TabAtkins: There seems to be overall agreement that this is fine. Some amount of fingerprinting concern, but since only shows up when you're printing less concern.<br>
&lt;fantasai> dholbert: Last few comments between me and Morten is that we don't want to use environment variable<br>
&lt;fantasai> dholbert: because you can't know that when preparing, depending on how it gets printed<br>
&lt;fantasai> dholbert: If you tell them there's a half-inch margin, and they are printing onto some other size of paper and are scaling things down<br>
&lt;fantasai> dholbert: then you are in the other printer<br>
&lt;fantasai> s/other printer/unprintable area/<br>
&lt;florian> q+<br>
&lt;fantasai> dholbert: so I suggested a different approach<br>
&lt;fantasai> dholbert: which is to clamp the margins<br>
&lt;fantasai> dholbert: But exposing the numeric value is potentially a footgun<br>
&lt;astearns> ack florian<br>
&lt;fantasai> florian: I followed why an env() variable wouldn't be appropriate. Didn't follow what you're proposing instead.<br>
&lt;fantasai> florian: There are cases where unprintable area differs on which side.<br>
&lt;fantasai> florian: It's not generally knowable what it is. But sometimes it is<br>
&lt;fantasai> florian: Would your proposal allow for that?<br>
&lt;fantasai> dholbert: Yes<br>
&lt;fantasai> dholbert: Simple way is to use the largest unprintable as if it's the distance on all sides<br>
&lt;fantasai> dholbert: so can have a simple keyword for that<br>
&lt;fantasai> dholbert: or could ask for per-side behavior<br>
&lt;fantasai> dholbert: I suggested 'enforce-safe-margin' descriptor, that UA could take into account after it knows the requested page size and the output paper size<br>
&lt;fantasai> -> https://github.com/w3c/csswg-drafts/issues/11395#issuecomment-3029150700<br>
&lt;fantasai> dholbert: Idea is to floor the author's specified margin with whatever info we get from the printer<br>
&lt;fantasai> dholbert: Author could choose whether to apply same increase to all 4 sides, or each individually, or add it into already requested margin<br>
&lt;fantasai> dholbert: Morten and I are not sure that we can know each side surely, because e.g. for duplex printing might not know<br>
&lt;fantasai> dholbert: So might be a printer-specific detail.<br>
&lt;fantasai> florian: In general case that we won't always know, but in some cases we can<br>
&lt;fantasai> florian: If you don't know, should assume they're all the same<br>
&lt;fantasai> astearns: sounds like we do prefer the descriptor over env(). Should we resolve on using a descriptor and take it back to the issue?<br>
&lt;fantasai> PROPOSED: Don't use env() for this. Use an @page descriptor roughly as proposed by dholbert; work out details in the issue.<br>
&lt;fantasai> RESOLVED: Don't use env() for this. Use an @page descriptor roughly as proposed by dholbert; work out details in the issue.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11395#issuecomment-3160889891 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 6 August 2025 16:53:24 UTC