Bug 160934 - Support image-set() standard syntax
Summary: Support image-set() standard syntax
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: https://drafts.csswg.org/css-images/#...
Keywords: InRadar
Depends on:
Reported: 2016-08-16 21:18 PDT by yisibl
Modified: 2019-06-20 11:27 PDT (History)
8 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description yisibl 2016-08-16 21:18:51 PDT
In spec[1] says:

Each <string> inside image-set() represents a <url>, just like in image().

image-set( "foo.png" 1x, "foo-2x.png" 2x, "foo-print.png" 600dpi );

[1] https://drafts.csswg.org/css-images/#image-set-notation
Comment 1 Radar WebKit Bug Importer 2016-08-17 12:41:09 PDT
Comment 2 Sunil Ratnu 2016-09-22 06:51:52 PDT
Is WebKit planning to support the above standard syntax in near future?
Comment 3 Dean Jackson 2016-09-22 08:54:28 PDT
I'm not sure what part of the syntax this bug is requesting. We don't yet support the dpi option, but it doesn't sound like this is the complaint.

Can you provide a test case that shows where we are failing?
Comment 4 Sunil Ratnu 2016-09-22 23:09:53 PDT
Currently Blink supports this syntax:

background-image: image-set( url("foo.png") 1x,
                             url("foo-2x.png") 2x,
                             url("foo-print.png") 3x );

From standard syntax, I mean the following:
background-image: image-set( "foo.png" 1x,
                             url("foo-2x.png") 2x,
                             "foo-print.png" 600dpi );

Looking at this, it can be seen that the standard syntax (i.e. [2]) is superset of currently supported syntax (i.e. [1]).

So, basically, you do not need url("..."), you can enter it as a string without the url() function. Also, the resolution part supports more than just #x (i.e. it supports #x as well #dpi)

Does WebKit have plans to support this standard syntax?
Comment 5 yisibl 2016-09-23 03:01:21 PDT
Yeah Sunil Ratnu is right