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

The CSS Working Group just discussed `[css-page] Expose unprintable areas via CSS`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> foolip: Issue is unprintable areas<br>
&lt;fantasai> foolip: Original idea was using env() for safe areas<br>
&lt;fantasai> foolip: but a bit unreliable because not dependable depending on how you feed the paper<br>
&lt;fantasai> foolip: so only safe to do is to report the largest margin<br>
&lt;fantasai> foolip: So new proposal, where we have a descriptor on @page and margin boxes<br>
&lt;fantasai> foolip: and new alias for margin called safe-margin which would compute to larger of margin and safe margin<br>
&lt;fantasai> foolip: required to do fallback correctly<br>
&lt;florian> q+<br>
&lt;fantasai> foolip: 3 modes for this: current behavior (no compensation), clamp (largest of the margins), and add (add to existing margin)<br>
&lt;fantasai> foolip: Unsure what the use case for that is, but long discussion with morton + dholber led to that<br>
&lt;astearns> q+<br>
&lt;emilio> q+<br>
&lt;astearns> ack florian<br>
&lt;fantasai> florian: I agree that not reliably knowable where things are<br>
&lt;fantasai> florian: unsure that it's never knowable<br>
&lt;astearns> q-<br>
&lt;fantasai> florian: maybe we can have some flexibility, UA can say it knows<br>
&lt;astearns> q+ to ask whether there is prior art in print formatters to follow<br>
&lt;fantasai> florian: want to avoid limiting behavior in cases where we could use that knowledge<br>
&lt;fantasai> foolip: You could easily turn page-safe-margin into 4 longhands<br>
&lt;fantasai> foolip: but if nobody wants that, should we really do that, or add it only when someone claims to be able to support<br>
&lt;fantasai> florian: good enough<br>
&lt;astearns> ack emilio<br>
&lt;fantasai> Proposal -<br>
&lt;fantasai> Add a property / descriptor (the spec seems confused about this terminology) for @page and @page margin boxes:<br>
&lt;fantasai> Name: page-margin-safety<br>
&lt;fantasai> Value: none | clamp | add<br>
&lt;fantasai> Initial: none<br>
&lt;fantasai> (because I scribed it badly originally)<br>
&lt;fantasai> emilio: I'm not sure awhy we need the aliasing thing?<br>
&lt;fantasai> emilio: Adds a weird dependency<br>
&lt;fantasai> emilio: Shouldn't change the descriptor's margin value<br>
&lt;fantasai> foolip: margin by itself would apply to all environments, but if don't need it<br>
&lt;fantasai> emilio: We have @supports for that<br>
&lt;fantasai> foolip: for descriptors?<br>
&lt;fantasai> emilio: Yeah, we have a resolution for that<br>
&lt;fantasai> emilio: Consider you print multiple pages per sheet<br>
&lt;fantasai> emilio: wouldn't you wnat to use the normal margin rather than the page-margin-safety thing?<br>
&lt;fantasai> foolip: This would apply to the 3 edges that apply to the edges<br>
&lt;fantasai> foolip: Some explanation that it only applies to margins adjacent to an edge<br>
&lt;fantasai> foolip: also applies to page margin boxes<br>
&lt;fantasai> florian: there the margin only applies to the one or two sides at the edge of the paper<br>
&lt;fantasai> emilio: but 1cm in the page... the page would be scaled down<br>
&lt;fantasai> foolip: that's why we moved away from env() as a solution<br>
&lt;fantasai> foolip: with this you know both the page size and what the safety is<br>
&lt;fantasai> foolip: scaling doens't make it unsafe again<br>
&lt;fantasai> emilio: if we need both, the override should happen at used-value time<br>
&lt;ChrisL> [css-conditional-5] Feature detection for descriptors<br>
&lt;ChrisL> https://github.com/w3c/csswg-drafts/issues/2463<br>
&lt;fantasai> emilio: when you access .style ...<br>
&lt;fantasai> foolip: it is<br>
&lt;mstensho6> When there are multiple pages per sheet, the UA should already add whatever margin safety it needs around the set of pages, and `page-margin-safety` should do nothing in such cases.<br>
&lt;fantasai> emilio: Mortons proposal for aliasing margin is weird<br>
&lt;fantasai> astearns: I expect that there is prior art in print formatters for this<br>
&lt;fantasai> astearns: might be worth checking what it is<br>
&lt;mstensho6> Aliasing is for feature detection. If we can do it `@supports`, that would be much better.<br>
&lt;astearns> ack fantasai<br>
&lt;astearns> ack astearns<br>
&lt;Zakim> astearns, you wanted to ask whether there is prior art in print formatters to follow<br>
&lt;florian> q?<br>
&lt;fantasai> fantasai: page-margin-safety seems good<br>
&lt;fantasai> fantasai: page-safe-margin seems problematic, just use @supports<br>
&lt;fantasai> florian: [something about individual cases]<br>
&lt;fantasai> fantasai: if we're taking the max, we take the max always. If we want individual controls, we can add them<br>
&lt;fantasai> fantasai: Might want symmetric all around. Or per axis. or each side individually. We can add keywords for these.<br>
&lt;dholbert> (I'm not fully grokking the page-safe-margin proposal, partly because I'm sleepy. :) but I agree with fantasai I think; if we can use @supports, I'm happy with the earlier `page-margin-safety` descriptor)<br>
&lt;fantasai> astearns: Let's have morton change the proposal in response to feedback, and bring it back for adoption<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-3526201060 using your GitHub account


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

Received on Thursday, 13 November 2025 07:58:40 UTC