-
Notifications
You must be signed in to change notification settings - Fork 463
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
Users cannot safely redefine url() #674
Comments
PR added to sass/sass-spec#149 (now containing issue 672 and 674) – Let me know if you want me to create a separate branch and make a new. |
Extra observation – I'm not sure if it is intentional in LibSass (why I did not make a PR) @function test($arg1, $arg2:null){
@return $arg1 + $arg2;
}
/* SASS 3.4.7 */
div {
test-1: test(foo, bar);
test-2: test(foo); // Invalid null operation: ""foo" plus null".
}
/* LibSASS 3.0.1
div {
test-1: foobar;
test-2: foo;
}
|
Specs added in sass/sass-spec@28351d9 |
After taking a moment to look into this is turns out this is actually two separate issues. Issue 1 - url(..)'s signature cannot be redefinedAlthough you can create an alternate function definition for @function url($foo/*, this will never matter */) {
// i can be changed
@return "doh!";
} http://sassmeister.com/gist/8d40797d5cf10a1774cf This is because there is special treatment of Issue 2 - printed lists are mangledThis is a known issue #639. Your second parameter isn't ever passed to http://sassmeister.com/gist/b6a8b677239082b190ae I've update the issue title to better reflect this as a case of issue 1. |
This issue has been reintroduced. A bisect shows the offending commit to be 51b0bf0 |
This PR activates specs for sass/libsass#674
LibSass does not support relative paths resolution. Nor does ruby-sass (unless we use Compass). At present, WE tries to resolve the URLs in the post-compilation step by using one base path. This misleads in the scenarios where we have nested imports and the meaning of 'relative path' need to be twisted to justify the outcome. :) Less provides this functionality OOTB. We will have to wait for LibSass to provide this functionality; either sass/libsass#674 or sass/libsass#532 gets addressed;
LibSass does not support relative paths resolution. Nor does ruby-sass (unless we use Compass). At present, WE tries to resolve the URLs in the post-compilation step by using one base path. This misleads in the scenarios where we have nested imports and the meaning of 'relative path' need to be twisted to justify the outcome. :) Less provides this functionality OOTB. We will have to wait for LibSass to provide this functionality; either sass/libsass#674 or sass/libsass#532 gets addressed;
With regard to #532, IMHO the relative paths feature can be implemented as a special case in extensible manner; providing most-common functionality OOTB.
|
I have a fix for this. Will publish when I'm home. |
This PR activates specs for sass/libsass#674
This PR activates specs for sass/libsass#674
We've had countless bugs and regressions with parsing url(). This patch is complete refactor of our url() parsing semantics to 100% match that of Ruby Sass. Fixes sass#674 Spec sass/sass-spec#539
We've had countless bugs and regressions with parsing url(). This patch is complete refactor of our url() parsing semantics to 100% match that of Ruby Sass. Fixes sass#674 Spec sass/sass-spec#539
It seems like the problem is isolated to the case where you pass more than
one argument to @function url($arg1, $arg2: '') { ... }
My tests shows that:
Note! When passing the second argument the last character of the first argument is removed
The text was updated successfully, but these errors were encountered: