W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2020

Re: [csswg-drafts] [css-values]: Express conditional values in a more terse way (#5009)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Fri, 08 May 2020 15:28:41 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-625871006-1588951720-sysbot+gh@w3.org>
> Authors may want a switch like this to apply by [...]

All but the first of those would require a key/value association in the function, rather than just a list (implicitly keyed by index), which would make the grammar more complicated.

On the other hand, k/v is required for the layout-time switching from bkardell's proposal <https://gist.github.com/bkardell/e5d702b15c7bcf2de2d60b80b916e53c>, so maybe something can be worked out.

I wouldn't want to complicate the common case by requiring each branch to be explicitly tagged with an integer, tho.

> I wonder @tabatkins why not keep what was specified in my proposal: clamp positive values (natural numbers) and invalidate for negative/zero.
> It preserves the two desirable behaviours of explicit invalidation and clamping. Otherwise, you either have one or the other.

Precisely *because* it's one-or-the-other, and thus consistent. Can you explain why you believe clamping overly-large values is useful?

> I'm unaware if other functions using the semicolon as a separator have been suggested.

Nope, this is new.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5009#issuecomment-625871006 using your GitHub account
Received on Friday, 8 May 2020 15:28:43 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:06 UTC