[csswg-drafts] [css-mixins-1] Further restrict `<css-type>` (#14007)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-mixins-1] Further restrict `<css-type>` ==
Function and Mixin arguments can have an optional type specified, which uses the [`<css-type>`](https://drafts.csswg.org/css-mixins/#typedef-css-type) production; this can be either a [`<single-syntax-component>`](https://drafts.csswg.org/css-values-5/#typedef-syntax-single-component) (like `<length>`) or a `type()` function for more complicated types.

However, `<single-syntax-component>` is kinda meant just as an internal type for the [`<syntax>`](https://drafts.csswg.org/css-values-5/#typedef-syntax) production (which is what `type()` accepts), so it also represents arbitrary single idents. In `<syntax>` this is good, as it lets you write grammars like `small | large`, but in the context of `<css-type>`, all it lets you do is specify that the type of your argument is... that literal ident. Like, `@function --foo(--arg small) {...}`, meaning you can pass `--foo(small)` but nothing else. That's weird!

Probably we should reshuffle these a bit, and only allow the `<foo>` literals as part of `<css-type>`.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/14007 using your GitHub account


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

Received on Wednesday, 3 June 2026 17:42:36 UTC