Re: [csswg-drafts] [css-cascade] Do we need a keyword similar to `revert`, but for cascade layers? (#5793)

The CSS Working Group just discussed `CSS Cascade 5`, and agreed to the following:

* `RESOLVED: Add revert-layer to Cascade 5`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: CSS Cascade 5<br>
&lt;bkardell_> q-<br>
&lt;Rossen_> github: https://github.com/w3c/csswg-drafts/issues/5793<br>
&lt;fantasai> miriam: Cascade layers work like origins in that they stack on top of each other, containing specificity<br>
&lt;fantasai> miriam: with origins, useful to revert to previous origns<br>
&lt;fantasai> miriam: suggestion that this might be useful for layers<br>
&lt;fantasai> miriam: might be possible also to say which level to revert to<br>
&lt;fantasai> miriam: but that's the question here<br>
&lt;fantasai> florian: I think we need at least one<br>
&lt;fantasai> florian: if pple use and need more, can extend further<br>
&lt;bkardell_> Rossen_: my q was whether we would want to put switch stuff in that same spec for now<br>
&lt;argyle> q+<br>
&lt;fantasai> argyle: would be useful<br>
&lt;Rossen_> ack argyle<br>
&lt;fantasai> argyle: seems likely that I'd want to revert down to a particular layer<br>
&lt;fantasai> argyle: think of Island app want to import their 3 layers<br>
&lt;fantasai> argyle: might want to revert down to a particular one<br>
&lt;argyle> background-color: revert(bootstrap);<br>
&lt;fantasai> s/Rossen_: my q/Rossen_, my q/<br>
&lt;leaverou> what about revert just reverts to the result of every other layer being applied *but* the current layer?<br>
&lt;fantasai> miriam: I'm open to both<br>
&lt;fantasai> leaverou, that's * {all: revert} at the start of your style sheet<br>
&lt;fantasai> [missed]<br>
&lt;fantasai> florian: behavior is obvious, can spec both and see which ones have been implemented<br>
&lt;leaverou> fantasai: I thought that reverted the entire current origin?<br>
&lt;fantasai> Rossen_: ?? much easier to implement<br>
&lt;dlibby> q+<br>
&lt;fantasai> Rossen_: specific-level revert is easier<br>
&lt;fantasai> dlibby: for specific-layer revert, any concerns wrt footgun for authors<br>
&lt;fantasai> dlibby: if referring to specific layer not applied yet?<br>
&lt;fantasai> s/specific-level/revert-to-previous-layer/<br>
&lt;argyle> `background: revert(bootstrap, 'hotpink');`<br>
&lt;fantasai> Rossen_: can refer to these as target-revert vs immediate-revert<br>
&lt;fantasai> fantasai: current-level-revert<br>
&lt;fantasai> florian: Seems confusing<br>
&lt;fantasai> florian: targetted one, doesn't revert a particular layer, reverts all layers down to named one<br>
&lt;fantasai> florian: if there's nothing there, it applies styles from previous layers<br>
&lt;fantasai> dlibby: Florian might have answered, but if you didn't have layer with particular name / hasn't been applied, seems odd to target something might come later in the cascade<br>
&lt;Rossen_> fantasai: my take, let's do the immediate layer revert. It is simpler to implement and spec. Say cascade 5 includes this and build use cases from there.<br>
&lt;florian> +1<br>
&lt;Rossen_> fantasai: let's keep it simple and start from there<br>
&lt;Rossen_> q?<br>
&lt;Rossen_> ack fantasai<br>
&lt;astearns> perhaps a note with the possible extension and an ask for use cases for it?<br>
&lt;fantasai> sure<br>
&lt;fantasai> Rossen_: Current proposal is go with current-level-revert for Cascade 5<br>
&lt;fantasai> fantasai: proposed name is revert-layer<br>
&lt;fantasai> fantasai: if no immediate suggestions to rename, let's go with that<br>
&lt;fantasai> RESOLVED: Add revert-layer to Cascade 5<br>
&lt;fantasai> &lt;br duration=10min><br>
&lt;jfkthame> present-<br>
</details>


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


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

Received on Thursday, 11 February 2021 23:14:48 UTC