W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2018

[csswg-drafts] [css-images] Reconsider ban on implicit nesting of image-set

From: Chris Nardi via GitHub <sysbot+gh@w3.org>
Date: Fri, 01 Jun 2018 02:57:43 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-328363321-1527821862-sysbot+gh@w3.org>
csnardi has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-images] Reconsider ban on implicit nesting of image-set ==
Per https://drafts.csswg.org/css-images-4/#image-set-notation:

> The `image-set()` function can not be nested inside of itself, either directly or indirectly (as an argument to another `<image>` type).

This seems to come from a resolution in https://lists.w3.org/Archives/Public/www-style/2012Aug/0855.html:

>    TabAtkins: image-set() inside itself is an issue
>    explains how nesting them makes no sense at all
>    TabAtkins: we can either disallow it
>    \<hober\> image-set(image-set(foo 1x, bar 2x) 2x, baz 1x)
>    \<hober\> (and you choose foo)
>    Tabatkins: but then you have to search arbitrarily deep
>    fantasai: I suggest disallowing that example
>    hober: am ok with disallowing
>    hober: but still doable
>    TabAtkins: am fine with disallowing
>    molly: when we start looking at syntax of this nature, designers
>           will freak out
>    molly: I can see it turning into a horrible problem
>    florian: someone writes a blog post ... gets copy pasted everywhere
>    Molly: i'm concerned with the syntax
>    Molly: I just want to advocate always keeping syntax in CSS as human
>           as possible
>    Molly: the nesting starts to look confusing
>    \* hober notes "as human as possible" is a great argument against dppx
>    TabAtkins: agreed in general, nesting functions is usually confusing

I would agree that explicit nesting would seem to make little sense in the context of image-set, and could generally create confusion. However, do we really need a ban on implicit nesting? It might not make all that sense, but it seems to only create additional work when parsing, as each time an image is parsed the implementation would have to remember if it saw image-set anywhere along the parsing chain.

(This doesn't make a case for reconsidering the ban on explicit nesting, as it would only be a one-time check, but I do wonder about that as well, considering that I don't believe there's other `<image>` properties that have this limitation.)


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2729 using your GitHub account
Received on Friday, 1 June 2018 02:57:46 UTC

This archive was generated by hypermail 2.3.1 : Friday, 1 June 2018 02:57:46 UTC