Re: [csswg-drafts] [css-properties-values-api] Are fallbacks provided for registered properties validated by the CP syntax? (#10455)

@SebastianZ I don't think that's right, `--foo` isn't invalid at computed value time: if you aren't setting it, it has initial value of `100px`. So you get `background-color: 100px`, which makes `background-color` invalid at computed value time and thus you get a transparent background. You would need `background-color: first-valid(var(--foo), yellowgreen)` to get the desired effect.

> If no fallback would ever be applied even if they pass syntax check then what's the point of dropping validation?

@miragecraft Well, what would be the point of making the declaration invalid at computed time just because the fallback value (that will be ignored) would be invalid if you were to use it on the property that you are substituting?

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


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

Received on Wednesday, 19 March 2025 23:47:35 UTC