W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2019

Re: [csswg-drafts] [css-values] String parsing function (replaces multi-value `attr()`) (#3702)

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Tue, 30 Apr 2019 22:42:51 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-488141805-1556664169-sysbot+gh@w3.org>
Yeah, I guess I don't have a lot of other good use cases. Being able to concat together a unit value and a number value and then parse them as a length would be another case, but it can be solved by the `calc(var(--num) * var(--unit))` approach.

The only other time where I see people complain about the difference between strings and numbers is for `counter()`.  Getting a `counter-val()` function, as requested in #1026,  in combination with a concat/format function for printing numbers in `content` would take care of those issues.

Mostly, this issue was because I didn't understand *why* the full `attr()` hadn't been implemented.  I guess I'd assumed it was a problem with the type parsing syntax being too vague, rather than an objection to having properties other than `content` depend on element attributes.

GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3702#issuecomment-488141805 using your GitHub account
Received on Tuesday, 30 April 2019 22:42:52 UTC

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