Re: [csswg-drafts] [css-values-4] Allow an inline way to do "first value that's supported" (#5055)

- What happens if it's mixed with other things?

  ```css
  :root { --fg: first-supported(grid; flow); }
  .foo { display: var(--fg) list-item; }
  ```

  `display: grid list-item` is currently invalid, and `display: flow list-item` is valid, so would it pick `flow`?

  Or the top post says "must be the whole value of the property", does that mean invalid at computed-value time otherwise?

- When does it resolve?

  If the usecase is using `first-supported()` in a variable, and then resolving depending on which property the variable is used, then it must stay unresolved in the variable.

  But what if used in a standard property like `display: first-supported(foo, grid)`? Does it resolve immediately at parse time? At computed-value time? What about registered custom properties?

- What if all values are invalid?

  ```css
  :root { --fg: first-supported(foo; bar); }
  .foo { display: var(--fg, grid); }
  ```

  Does `display` become invalid at computed-value time? Does it fallback to `grid`?

  ```css
  .foo { display: grid; display: first-supported(foo; bar); }
  ```
  If it's resolved at parse time in standard properties, and all specified values are invalid, is the declaration dropped, producing `display: grid`? Or `display` becomes invalid at computed-value time?

- What if some value contains `var()`?

  ```css
  .foo { display: first-supported(var(--foo); grid); }
  ```

   Does it behave like `display: var(--foo)` since that's valid syntax (like in `@supports`), or would it wait to substitute the variable before checking the validity (like usual for `var()`)?

  Top post says both "using the same fallback logic as normal CSS" and "post-substitution", so not clear.

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


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

Received on Friday, 15 October 2021 19:22:22 UTC