Re: [csswg-drafts] [css-page-4] Page margin box for watermarks and overlays (#1393)

We've had this functionality in our Report Generator for years, and it's popular - mostly for stamping "confidential" or "draft" on things.

If there were two layers - "underlay" or "background" (behind any content but above the page background), and "overlay" (on top of all content)- that would cover the two obvious cases, and implementing both is no harder than implementing one. I'm not sure any other form of interleaving with document content would be possible (injecting things into layers containing transforms and z-index?) or desirable.

The underlay option would effectively be creating another background layer, above any background on the @page (which includes those propagated from the root or HTML body).
```css
@page {
    @underlay {
         content: counter(page);
         font-size: 80vh;
         text-align: center;
    }
}
```

-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1393#issuecomment-583739565 using your GitHub account

Received on Saturday, 8 February 2020 14:06:47 UTC