- From: Morten Stenshorne via GitHub <noreply@w3.org>
- Date: Thu, 11 Sep 2025 06:39:32 +0000
- To: public-css-archive@w3.org
1. `clamp` and `add`?
2.
```css
<style>
@page {
margin: 50px;
}
@supports (page-margin-safety: additive) {
@page {
page-margin-safety: additive;
margin: 0;
}
}
body {
background: yellow;
}
</style>
```
This works for me in Chrome (with some local patches, obviously).
This, too (without any patches):
```css
<style>
@supports (size: A4) {
body::before {
content: "PASS";
}
}
</style>
```
It doesn't work in Firefox. But looks like it's Chrome that's buggy. Chrome doesn't really treat `@page` descriptors very differently from properties, which means that `size: A4` is a valid declaration inside a regular style rule (which is wrong).
The spec wording starts like this:
> The @supports rule is a conditional group rule whose condition tests whether the user agent supports CSS property:value pairs.
So... well... let `page-margin-safety` be a property instead, one that only applies in page and margin contexts? 😄 Or introduce a shorthand "descriptor" that sets both `page-margin-safety` and margins?
--
GitHub Notification of comment by mstensho
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11395#issuecomment-3278475372 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 11 September 2025 06:39:33 UTC