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

[csswg-drafts] [css-content] URL fallbacks in 'content' should require type() or format()

From: Simon Pieters via GitHub <sysbot+gh@w3.org>
Date: Wed, 22 Jun 2016 12:01:31 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-161663516-1466596890-sysbot+gh@w3.org>
zcorpan has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-content] URL fallbacks in 'content' should require type() or 
format() ==
https://drafts.csswg.org/css-content/#example-1a710936

> ```
/* Replace <logo> elements with the site’s logo, using a format
 * supported by the UA */
logo { content: url(logo.mov), url(logo.mng), url(logo.png), none; }
```

I think this is bad. In order for the fallback to work at all, the UA 
needs to fetch each resource in order and try to decode it, and stop 
when it has found something it can decode. This is like 
`<video><source>` when *not* using the `type` attribute, and I think 
it is bad both for page loading performance and for increased 
implementation complexity. We carefully avoided it when designing 
`<picture>`'s processing model.

If we want this to work, I think a `type()` or `format()` function (or
 some such) to go with each URL should be provided, so the UA can skip
 resources it knows it doesn't support right away. If it isn't 
provided, then the UA should load the given resource and if it finds 
it doesn't support it, it should *not* try to load the next item; it 
should skip straight to the next non-url fallback (`none` above).

cc @fantasai @tabatkins @yoavweiss

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/217 using your GitHub 
account
Received on Wednesday, 22 June 2016 12:01:41 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:20 UTC