[css-values-4] Allow src() to take multiple arguments #6717
Labels
Commenter Satisfied
Commenter has indicated satisfaction with the resolution / edits.
css-values-4
Current Work
css-values-5
In #541 we resolved to add
src()
as aurl()
alias without the weird parsing rules around unquoted strings that preventurl()
from containingvar()
references, and @tabatkins made the edits.However, for
var()
to truly be useful with URLs and cover the main use cases, there are two more pieces of the puzzle: concatenation and casting to string. There is #542 where we discuss proposals for syntax to do both, but so far they have not reached enough consensus (although there is mostly consensus on the necessity).I was thinking, since the main use case for concatenating strings and casting to string is building dynamic URLs (especially SVG data URIs), what if we just allow
src()
to take multiple arguments, and concatenate (and cast, as needed) the result?E.g. something like this would then work:
Which would address a lot of today's hacks wrt icons in one fell swoop.
The text was updated successfully, but these errors were encountered: