سؤال

I'd like to set my cookieless domain in a variable and reuse it for background images like this:

@static_url: "//static.example.com";
.background {background:url(@static_url/images/layout/sprite-icn.png) no-repeat;}

but my LESS compiler (lesscss-engine-1.3.0.jar) throws an error cause of these lines.

هل كانت مفيدة؟

المحلول

Solution was:

@static_url: "//static.example.com";
.background {background:url("@{static_url}/images/layout/sprite-icn.png") no-repeat;}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top