The CSS if() function provides a concise way to express conditional values. It accepts a series of condition-value pairs, delimited by semicolons. The function evaluates each condition sequentially and returns the value associated with the first true condition. If none of the conditions evaluate to true, the function returns an empty token stream. This allows web authors to express complex conditional logic in a simple and concise way. Example: <style> div { color: var(--color); background-color: if(style(--color: white): black; else: white); } .dark { --color: black; } .light { --color: white; } </style> <div class="dark">dark</div> <div class="light">light</div>
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
Ties into CSS Value Debugger work: https://docs.google.com/document/d/1zyKdPREtKT8OU4WtlHV_Wxet3SvyUtAXrTdFLPmYmdU
https://wpt.fyi/results/css/css-values?label=master&q=if- https://wpt.fyi/results/css/css-values/if-cycle.tentative.html -the cycles behaviour has been resolved in https://github.com/w3c/csswg-drafts/issues/11500, but the spec does not address the resolution yet.
Shipping on desktop | 136 |
Shipping on Android | 136 |
Shipping on WebView | 136 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneThanks for the feedback, Alan.
Worth noting that the Mozilla and WebKit position requests have
been open for 1 month, which seems to me to be a reasonable amount
of time for them to register concerns. Same goes for TAG, but
there are initial positive signals at
https://github.com/w3ctag/design-reviews/issues/1045#issuecomment-2653010192.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/45a12b35-349b-473b-8d8c-e44d45faaf8bn%40chromium.org.
>>> send an email to blink-dev+unsubscribe@chromium.org.
>>> To view this discussion visit https://groups.google.com/a/
>>> chromium.org/d/msgid/blink-dev/45a12b35-349b-473b-8d8c-
>>> e44d45faaf8bn%40chromium.org <https://groups.google.com/a/
>>> chromium.org/d/msgid/blink-dev/45a12b35-349b-473b-8d8c-
>>> e44d45faaf8bn%40chromium.org?utm_medium=email&utm_source=footer>.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "blink-dev" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to blink-dev+unsubscribe@chromium.org <mailto:blink-
Will second the thanks, Emilio, but will reiterate that Blink's test here isn't WG consensus, but rather web developer feedback. If there's concern among developers that this proposal isn't on the right trajectory, would be good to hear that now.Best,Alex
Some of these changes (which are somewhat significant) have been discussed last week, like [1] for a
concrete example, and the spec hasn't even been updated yet...
[1]: https://github.com/w3c/csswg-drafts/issues/11500
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAF2G5YuagVxixVxp5H0x14gkA_Q9nir-%2BJ1AHVPkAEsyiQu6FQ%40mail.gmail.com.
Does our implementation match these new edits?
Does our implementation match these new edits?
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
LGTM3
/Daniel
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a7e062cb-4e08-43c9-a8a4-bdd6f94cd785n%40chromium.org.