Re: [csswg-drafts] [css-variables] CSS-wide keywords in fallbacks (#5325)

The CSS Working Group just discussed `[css-variables] CSS-wide keywords in fallbacks`, and agreed to the following:

* `RESOLVED: Using initial value as fallback of var triggers initial value behavior assuming that the property only has that keyword because of substitution`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [css-variables] CSS-wide keywords in fallbacks<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/5325<br>
&lt;dael> TabAtkins: Another by andrers. Started out confused by behavior of css wide keyword like initial in fallback of var. Css wide keywords are handled very early in process. Once variables substitute it's later. Using initial subs in the keyword initial which is usually invalid. It's not using the initial machinery<br>
&lt;dael> TabAtkins: WE've apparently always had behavior that if you use css-wide keyword as a fallback we'll trigger the appropriate behavior. emilio suggests FF has also always had that.<br>
&lt;dael> TabAtkins: Reasonably useful behavior. B/c everyone is already doing it I don't see harm in spec. Using initial value as fallback of var triggers initial value behavior assuming that the property only has that keyword because of substitution<br>
&lt;dael> Rossen_: Reasonable<br>
&lt;dael> Rossen_: Additional thoughts or reasons why we shouldn't have variables with initial value behave that what?<br>
&lt;dael> fantasai: That's impl for revert? THe rest handles at computed but revert is cascade time<br>
&lt;dael> TabAtkins: No more or less than a prevoius item we did which also triggered revert for forced-colors. It makes anders a lttle sad<br>
&lt;dael> fantasai: If we can rollback cascade why can't we reat invalid values at declaration<br>
&lt;dael> TabAtkins: Big difference than doing this annoying thing when authors ask and doing it any time a variable is invalid<br>
&lt;dael> fantasai: I think handling other keywords is fine, if revert is impl it's great. Would also be nice to allow revert to previous declaration.<br>
&lt;AmeliaBR> What happens if the keyword isn't the only value of the property? `border: pink var(--line-width); --line-width: inherit` Does the whole thing get the invalid / unset behavior, or an inherit behavior?<br>
&lt;dael> fantasai: I would like to make sure all impl can handle revert because specing it works.<br>
&lt;dael> TabAtkins: I believe that's not something we handle separate. Right now none of the keywords are. All except perhaps revert work in implementations even if revert is harder.<br>
&lt;dael> fantasai: Works for me. I would like revert to work but want to make sure it does before we spec<br>
&lt;dael> Rossen_: Sounds like fantasai is on board.<br>
&lt;dael> Rossen_: Objections?<br>
&lt;dael> RESOLVED: Using initial value as fallback of var triggers initial value behavior assuming that the property only has that keyword because of substitution<br>
</details>


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


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

Received on Wednesday, 2 September 2020 23:40:48 UTC