[csswg-drafts] [css-page] Should page properties support `!important`? And descriptors? (#5970)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-page] Should page properties support `!important`? And descriptors? ==
This is quite a mess in browsers. I believe in Gecko we support `!important` just basically by chance...

We happen to also support custom properties in `@page`:

```html
<!DOCTYPE html>
<style>
@page {
  --margin: 200px;
  margin: var(--margin);
}
:root {
  background: red;
}
</style>
```

But that's just an artifact of our current implementation, which is a hack and supports only properties, not descriptors.

It'd be good to know how are descriptors supposed to behave, what CSS features are supposed to work on descriptors, and such, in order to know what to support.

To elaborate, there's trickiness in supporting these features on descriptors... You can implement them like a CSS property, but then it's tricky not to expose it in other parts of the platforms. For example, WebKit and Blink both parse `size: a3` on regular style rules, which is just bad.

Anyhow I suppose given other browsers support custom properties etc we'll do the tricky thing, but the spec should probably be clarified how a mix of properties and descriptors interact...

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5970 using your GitHub account


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

Received on Wednesday, 10 February 2021 01:51:19 UTC