W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2017

Re: [csswg-drafts] [css-values] enable the use of counter() inside calc()

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Thu, 02 Nov 2017 14:17:09 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-341435007-1509632228-sysbot+gh@w3.org>
@upsuper Fair point, counter values are inherited from the immediately preceding element in document order instead of from the parent element as usual. So maybe it would be better to add a `sibling-index()` function as Tab Atkins proposed in https://github.com/w3c/csswg-drafts/issues/1869#issuecomment-340078522; it would be less powerful but I think it would cover most usecases.

However, note that the CSS Lists draft currently allows [`counter()`](https://drafts.csswg.org/css-lists/#counter-functions) anywhere a `<string>` is expected, doesn't this have the same problem? If it's possible to use a counter value as a string, it should also be possible to use it as an integer.

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1026#issuecomment-341435007 using your GitHub account
Received on Thursday, 2 November 2017 14:17:14 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 2 November 2017 14:17:15 UTC