Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-content] content property, <image> | <url> can be just <image> #216

Closed
zcorpan opened this issue Jun 22, 2016 · 7 comments
Closed

[css-content] content property, <image> | <url> can be just <image> #216

zcorpan opened this issue Jun 22, 2016 · 7 comments
Assignees

Comments

@zcorpan
Copy link
Member

zcorpan commented Jun 22, 2016

https://drafts.csswg.org/css-content/#content-property

https://drafts.csswg.org/css-images-3/#typedef-image

Since <image> expands to <url> | ..., there is no need to include <url> as well when using <image> in the Value grammar.

@dauwhe
Copy link
Contributor

dauwhe commented Jun 23, 2016

fixed via cbdf6c6

@dauwhe dauwhe closed this as completed Jun 23, 2016
@dauwhe dauwhe removed the ready label Jun 23, 2016
@fantasai
Copy link
Collaborator

These were called out separately because the url could in theory be other than an image, e.g. a sound file.

@fantasai fantasai reopened this Jun 28, 2016
@plinss
Copy link
Member

plinss commented Jun 28, 2016

Per the definition of <image>: if the <url> doesn't point to a valid image, then it needs to be handled as an invalid image, so, yeah, we explicitly need a <url> here for non-images.

Also the there are inconsistent uses of the term URI vs URL throughout the document, recommend they all become URL.

(edited to escape < as &lt; —@zcorpan)

@SebastianZ
Copy link
Contributor

SebastianZ commented Jun 28, 2016

These were called out separately because the url could in theory be other than an image, e.g. a sound file.

Could it be turned into a <non-image-url> then to make the difference clear?

@plinss Your comment misses the types. You need to code-format them to be displayed correctly.

Sebastian

@zcorpan
Copy link
Member Author

zcorpan commented Jun 29, 2016

Is there implementation interest in supporting sounds here?

@jonathanKingston
Copy link
Contributor

I noticed this when trying to draft up how this would attach to the Fetch specification, ideally knowing the content type ahead of the request would be better here.

The issue with supporting sounds surely would require some clearer form of content negotation than just URL's right?

For example using URL modifiers as per the spec to be something like this:

content: url('myimg.png' content-type('image/png')),  url('mysound.ogg', content-type('audio/ogg')) / "fall back text";

Where anything else is assumed images.

For brevity the request types of fetch could be used instead:

content: url('myimg.png' type('image')),  url('mysound.ogg', type('media')) / "fall back text";

Also the <uri> is still present in <content-list> this should probably be changed to <image> right?

@tabatkins
Copy link
Member

Yeah, lacking an actual definition of how we would content-negotiate non-image things, this should be specialized to <image> for now. It can be expanded to handle other types as we actually allow them, likely with specialized functions akin to image().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants