Re: [csswg-drafts] [css-mixins-1] `<type()>` conflicts with a previous definition in `css-images-4` (#10810)

🤔 then maybe this is an issue in `csstree`?

css-images-4:

```json
  values: [
    ...
    {
      "name": "image-set()",
      "prose": "Delivering the most appropriate image resolution for a user’s device can be a difficult task. Ideally, images should be in the same resolution as the device they’re being viewed in, which can vary between users. However, other factors can factor into the decision of which image to send; for example, if the user is on a slow mobile connection, they may prefer to receive lower-res images rather than waiting for a large proper-res image to load. The image-set() function allows an author to ignore most of these issues, simply providing multiple resolutions of an image and letting the UA decide which is most appropriate in a given situation.",
      "href": "https://drafts.csswg.org/css-images-4/#funcdef-image-set",
      "type": "function",
      "value": "image-set( <image-set-option># )",
      "values": [
        {
          "name": "type()",
          "value": "type( <string> )",
          "href": "https://drafts.csswg.org/css-images-4/#funcdef-image-set-type",
          "type": "function"
        }
      ]
    },
```

```json
  values: [
    ...
    {
      "name": "<type()>",
      "href": "https://drafts.csswg.org/css-mixins-1/#typedef-type",
      "type": "type",
      "value": "type( <syntax> )"
    },
```

`csstree` doesn't make the distinction between a type `<foo()>` and a function `foo()`.
But I am also unsure how it could.

When referenced both look the same:

```
<bar> = <foo()> | none
```

That the specs incorrectly link (`css-mixins` links to `css-images-4`) seems to "prove" that this type is ambiguous.

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


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

Received on Sunday, 1 September 2024 07:56:54 UTC