Because Properties hooks into pre_process and Variables hooks into process, custom properties such as image-replace are unable to take variables.
Switching Properties to process and Variables to pre_process resolves the issue, but I don't know if that has any adverse effects.
Example:
@variables img {
someimage: /test.jpg;
}
#test {
image-replace: url(img.someimage);
/* returns url(img.someimage), not url(/test.jpg) */
/* parses to: background:url(/test.jpg) no-repeat 0 0;height:0;padding-top:0px;width:0px; ... */
/* Because image is not found, so no dimensions are set, THEN the variable gets replaced after image-replace has run */
/* With hook order switched dimentions are filled in: */
/* background:url(/test.jpg) no-repeat 0 0;height:0;padding-top:460px;width:320px; ... */
}
Because Properties hooks into pre_process and Variables hooks into process, custom properties such as image-replace are unable to take variables.
Switching Properties to process and Variables to pre_process resolves the issue, but I don't know if that has any adverse effects.
Example: