- From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
- Date: Fri, 06 Apr 2012 10:41:22 +0800
- To: WWW Style <www-style@w3.org>
- CC: fantasai <fantasai.lists@inkedblade.net>
(12/03/21 7:20), fantasai wrote: > I received a suggestion[1] from Maxime Thirouin [1] for templating URLs > with the following example. [2] > Forwarding here for archival / discussion. > > ~fantasai > > [1] https://twitter.com/MoOx/status/173093535275421697 > [2] http://dabblet.com/gist/1753404 > > [data-gravatar-uri]::after > { > content: url(attr(data-gravatar-uri)); /* impossible */ > } > > [snip other new proposals] When it says 'impossible', does this mean browsers currently don't support it or CSS3 V&U doesn't support it? This relates to this questionable statement in the spec # It corresponds to the URI token in the grammar. [CSS21] Is this really true? It was suggested that FUNCTION STRING ')' makes a <url> too[1] and there's even a test case in the CSS 2.1 test suite (see the link). But if 'url(' <string> ')' makes a <url>, I would suggest we include this description (like how image() is defined) so that the above works. (Or explicitly disallow it.) == other irrelevant nitpickings in this section == I don't know if this section should remind spec editors that <url> was <uri> in CSS 2.1. I notice that CSS3 Images is, for instance, using the wrong ones. But in any case, I support changing the type name to be in line of the function name. # Furthermore it replaces the ‘<url>’ type in the #‘background-image’ and ‘list-style-image’ definitions in CSS1 # and CSS2 and adds ‘<image>’ as an alternative to ‘<url>’ in the # ‘content’ property's value. It is presumed that CSS # specifications beyond CSS2.1 will use the ‘<image>’ notation in # place of ‘<url>’ where 2D images are expected. (This was too nitty so I didn't get to report it.) # Note that in some CSS syntactic contexts (as defined by that # context), a URL can be represented as a <string> rather than by # <URL>. An example of this is the ‘@import’ rule. s/<URL>/<url>/ # Parentheses, whitespace characters, single quotes (') and double # quotes (") appearing in a URL must be escaped with a backslash so # that the resulting value is a valid URL token, e.g. #‘url(open\(parens)’, ‘url(close\)parens)’. s/URL token/URI token/ and also that should link to the CSS 2.1 grammar instead of the <dfn>URL</dfn> [1] http://lists.w3.org/Archives/Public/www-style/2011Apr/0701 Cheers, Kenny
Received on Friday, 6 April 2012 02:41:52 UTC