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

@kizu `margin-left: calc(-1 * inherit(padding-left))` just makes `margin-left` inherit from the `padding-left` of the parent/originating element/whatever and mix that inherited value with something else. The value of `padding-left` on the current element doesn't matter, you don't need `padding: inherit`.

I think some people may be misunderstanding `inherit(prop)` as in using the value of `prop` on the same element, like `var(--prop)`, but this would lead to circularities. And tracking dependency cycles like for custom properties would have problems: we already have dependencies between properties, and if authors can add more, compat could prevent us from adding more dependencies in the future.

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


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

Received on Tuesday, 31 January 2023 07:19:34 UTC