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

Re: [csswg-drafts] Updating the css `env()` function to enable selection by index from a list of pre-defined environment variables (#5622)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 15 Oct 2020 05:30:35 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-708907388-1602739834-sysbot+gh@w3.org>
I'm not sure I understand what value the index() function is bringing here. Your proposal is for allowing an env() variable to be multi-valued, with an integer index to select one of the values; index() doesn't add anything here, and is being used with a syntax and purpose unrelated to its original proposal.

If you need something like this functionality, we can just add an optional integer to the syntax, so `env(name 1)` is valid and has the meaning you're sketching.

That said, I'm not sure I see how this affects the verbosity at all. All it's doing is moving the integer out of the name. I don't immediately see how this changes what the names would actually be, however - aren't `env(display-segment-1-width)` and `env(display-segment-width 1)` essentially identical?

It's possible I'm missing some important details of this proposal. ^_^

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 15 October 2020 05:30:36 UTC

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