Re: [csswg-drafts] Declarative custom functions (#7490)

Another question, sorry for the spam:

Would the initial value of `result` be the `guaranteed-invalid value`?

So that you could declare a function that always returned invalid?

```css
@custom-function --invalid() {
   result: initial;
   /* 
   if there is a return-syntax, that would probably have to be the universal syntax definition 
   to skip fallback and allow result to return the initial `guaranteed-invalid value`*/
   result-syntax: "*"; 
} 

/* So that this */
.with-custom-function {
   some-prop: --invalid(); /* Guaranteed invalid value */
}

/* Would be equal to this */
.with-custom-prop {
  --invalid: initial;
  some-prop: var(--invalid); /* Guaranteed invalid value */
}

```

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


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

Received on Saturday, 23 July 2022 14:37:03 UTC