[csswg-drafts] Pull Request: [css-mixins-1] Let 'inherit' work like 'inherit()'

andruud has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [css-mixins-1] Let 'inherit' work like 'inherit()' ==
With `@function`, it becomes possible to have a "type mismatch" between an "outer" custom property and an "inner" custom property:

```
@property --x {
  syntax: "auto | red";
  /* ... */
}

@function --f(--x <color>: inherit) {
  result: var(--x);
}

div {
  --x: red;
  --f(); /* => ? */
}
```

We have to address this somehow, and the obvious way seems to be making 'inherit' behave like "a var(--x) that resolves in the parent stack frame". This is essentially what inherit() does, which already exists in the spec.


See https://github.com/w3c/csswg-drafts/pull/12387


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

Received on Monday, 23 June 2025 13:09:00 UTC