[csswg-drafts] [css-syntax] Changes in "how to consume an ident-like token" (#3593)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-syntax] Changes in "how to consume an ident-like token" ==
(migrated from the mailing list)

**Mattéo Delabre said:**

> In the current draft, the 4.3.4. section differs from the last version (20 February 2014).
> Here is the 2014 version:
> 
> If the returned string’s value is an ASCII case-insensitive match for "url", and the next input code point is U+0028 LEFT PARENTHESIS ((), consume it. Consume a url token, and return it.
> 
> Here is the current version:
> 
> If the returned string’s value is an ASCII case-insensitive match for "url", and the next input code point is U+0028 LEFT PARENTHESIS ((), consume it. While the next two input code points are whitespace, consume the next input code point. If the next one or two input code points are U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), or whitespace followed by U+0022 QUOTATION MARK (") orU+0027 APOSTROPHE ('), then create a <function-token> with its value set to the returned string and return it. Otherwise, consume a url token, and return it.
> 
> The new paragraph implies that
> 
> url(http://example.com/)
> 
> should become an <url-token> with the http://example.com/ value, whereas
> 
> url('http://example.com')
> 
> should become a <function-token> with the url value, followed by a <string-token> with the http://example.com/ and a <)-token>.
> 
> Is it intended that an url that is enclosed in quotes should now be interpreted as a function rather than a url token ?

----------------

**Tab Atkins said:**

> Yes, it is.  This is so we can treat url() as a normal function (as
> long as you use quoted strings) and give it additional arguments, such
> as Fetch parameters or link-integrity stuff.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3593 using your GitHub account

Received on Friday, 1 February 2019 23:56:34 UTC