Re: [csswg-drafts] [css-anchor-position-1] Define `CSSPositionTryRule.style` as `CSSPositionTryProperties` (#10108)

The CSS Working Group just discussed ``[css-anchor-position-1] Define `CSSPositionTryRule.style` as `CSSPositionTryProperties` ``, and agreed to the following:

* `RESOLVED define a new interface type for position-try similar to how page descriptors are defined, with every allowed property included`

<details><summary>The full IRC log of that discussion</summary>
&lt;chrishtr> TabAtkins: the CSSOM interface for position-try has a CSSStyleDeclaration object to hold the properties at present.<br>
&lt;emilio> q+<br>
&lt;chrishtr> TabAtkins: however, some similar @ rules like page rules, have been done by exposing the properties valid on it directly<br>
&lt;chrishtr> TabAtkins: do we want to follow that same pattern?<br>
&lt;chrishtr> TabAtkins: currrently only spec prose prevents exposing all CSS properties since the type allows it<br>
&lt;chrishtr> TabAtkins: but page rules only accepts the properties specified by what that spec accepts<br>
&lt;chrishtr> TabAtkins: should we go with the page rules approach and settle that as as a precedent as well for future patterns?<br>
&lt;TabAtkins> https://drafts.csswg.org/cssom/#the-csspagerule-interface<br>
&lt;chrishtr> TabAtkins the page rules object has a CSSPageDescriptors interface that explicitly lists the allowed properties<br>
&lt;chrishtr> emilio: page is different because there are some properties that don't exist in CSSStyleDeclaration<br>
&lt;chrishtr> emilio: a better comparison to try rules is keyframe rules, which disallow some properties<br>
&lt;chrishtr> TabAtkins: yes that's similar but since they exclude some of the properties and copying that mechanism could be annoying (?)<br>
&lt;chrishtr> emilio: prefer to be consistent with keyframe rules for consistency<br>
&lt;Rossen__> ack emilio<br>
&lt;chrishtr> emilio: if we did that then also future extensions to position-try would be more easily feature detectible<br>
&lt;chrishtr> dbaron: another thing to keep in mind is whether properties that do not apply in position try should be parsed and stored in the CSSOM object.<br>
&lt;chrishtr> dbaron: not sure whether this happens for animation properties in keyframes<br>
&lt;chrishtr> fantasai: seems unlike that developers will rely on whether these properties are stored on keyframes, so we could likely change that<br>
&lt;chrishtr> fantasai: think position try should be more like keyframes, because both apply to regular elements. but page descriptors are a special context that is not quite like visual display on the screen.<br>
&lt;chrishtr> emilio: don't want another interface with hundreds of properties on it just to prevent animation properties in keyframes, that seems not useful<br>
&lt;chrishtr> emilio: this would be a waste because there would be some basically useless generated code and spec to maintain<br>
&lt;fantasai> that's a fair point, dbaron<br>
&lt;chrishtr> dbaron: the part that is more like page descriptors than keyframes is that position-try has a short list of properties allowed whereas keyframes has a very long list<br>
&lt;chrishtr> emilio: that would be fine<br>
&lt;fantasai> s/visual display on the screen/regular box layout/<br>
&lt;chrishtr> TabAtkins: it seems people think that aligning with page descriptors makes more sense because it's a small subset of properties<br>
&lt;chrishtr> proposed resolution: define a new interface type for position-try similar to how page descriptors are defined, with every allowed property included<br>
&lt;chrishtr> RESOLVED define a new interface type for position-try similar to how page descriptors are defined, with every allowed property included<br>
&lt;Rossen__> s/RESOLVED/RESOLVED:/<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10108#issuecomment-2047997941 using your GitHub account


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

Received on Wednesday, 10 April 2024 16:28:31 UTC