-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Support dot and slash in literal mixin parameter #1588
Comments
The dot is not the only problem. Notice it also has |
Just like with I'm requesting it to reflect the bare values CSS supports in a similar position. Upon checking the specification for the core CSS2 spec, it seems well defined at http://www.w3.org/TR/CSS2/syndata.html#uri. It recommends url escaping for parenthesis or escaping:
That "escaping" part concerns me and is probably not feasible to support in Less (except when used in an actual use of .example {
list-style: url(http://www.example.com/redball_\(foo\).png) disc;
} This is valid CSS. .example {
.backgrond-image(images/foo.png);
} This breaks in LESS. .example {
.backgrond-image(images/foo);
} This seems valid (doesn't parse error), but results in spaces being added: .example {
.backgrond-image: url(images / foo);
} |
I've always liked bare values in CSS. And though in theory there are case where you need to quote or escape, in practice I never run into that with real code. It would be nice if Less at least supported the dot and slash, but I can see how that opens up hazards. Feel free to close if this is crazy, I'm satisfied either way :-) |
Yes, I think its more trouble than its worth. Css can use context.. in less |
unquoted urls are the source of alot of problems, we don't want to exacerbate that.. closing.. |
Would it be feasible to allow dots in literal mixin parameters?
The argument can be quoted, but since CSS allows them to be unquoted (e.g. in
url()
) would be nice if Less would support that as well.The text was updated successfully, but these errors were encountered: