Re: [csswg-drafts] [css-values-4] inherit() function: like var() for parent value, for any property (#2864)

> How would this interact with a custom property defined using @property and inherits: false;? e.g.:

All properties have [inherited values](https://w3c.github.io/csswg-drafts/css-cascade/#inheriting), regardless of whether they inherit by default or not. You can specify `inherit` for *any* property, after all. ^_^

So there's no special interaction there. It grabs the inherited value from the parent, identically to using `inherit`. (This just lets you refer to other properties.)

---------

While I do like `parent()`, I'd like to acknowledge that "this acts identically to `inherit`, just from a different property" is a pretty reasonable argument for `inherit()`. Probably makes the behavior easier to explain/understand, and we do this "make a keyword into a function to allow customization" trick in several other places in CSS.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2864#issuecomment-1409535076 using your GitHub account


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

Received on Monday, 30 January 2023 23:52:17 UTC