- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Mon, 27 Feb 2023 14:56:40 +0000
- To: public-css-archive@w3.org
> It seems it's possible to just have `size` in an `@page` context just be handled specially. It would be a little bit confusing that outside of `@page` it's a shorthand for `width`+`height`, but within `@page` it's a special property, but I think it might be the best option. Specs do not seem to preclude handling it specially. [CSS Syntax](https://drafts.csswg.org/css-syntax-3/#ref-for-typedef-declaration-list%E2%91%A3) requires that a CSS rule taking `<declaration-list>` define the properties and descriptors it accepts: `@page` does not accept the `size` property but accepts a `size` descriptor. *From this perspective*, I do not see where CSSOM prevents a context-specific handling (even if `CSSPageRule.style`, ie. `CSSStyleDeclaration`, is defined with all properties). `font-style` already has a slightly different syntax depending on if it is declared in a style rule or `@font-face`, and `CSSFontFaceRule.style.setPropertyValue('font-style')` is supposed to be supported (`style` and `setPropertyValue()` are misleading). Fwiw, what confuses me is not that a property grammar could be different depending on the context, but it is this differentiation between property and descriptor, which I cannot find in any other language, and to support `CSSPageRule.style.setPropertyValue('size')` at the same time (`style` is misleading). -- GitHub Notification of comment by cdoublev Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/820#issuecomment-1446479524 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 27 February 2023 14:56:41 UTC