grunt-contrib-less icon indicating copy to clipboard operation
grunt-contrib-less copied to clipboard

Expansion not happening for @{img_path}

Open roboweaver opened this issue 9 years ago • 0 comments

I have a less file that has a variable defined as:

@img_path: '/wp-content/themes/dragons/images/';

And a reference to that as:

background: #f06029 url("@{img_path}orange-atom-bg.jpg") no-repeat 50% 50%;

In the CSS output, I get

background:#f06029 url(@{img_path}cream_pixels.png) 50% 50%

What I'd expect is:

background:#f06029 url("/wp-content/themes/dragons/images/'cream_pixels.png") 50% 50%

I saw another thread about changing the variable to include the double quotes inside the single quotes, but that obviously wouldn't work in this case.

Am I missing a parameter for less?

less: {
    style: {
        options: {
            cleancss: true,
            report: "min"
        },
        expand: true,
        files: [
            {
                "style.min.css": "style.less"
            }, {
                "bootstrap.min.css": [
                    "node_modules/bootstrap/less/bootstrap.less",
                    "node_modules/bootstrap-toggle/css/bootstrap-toggle.min.css"
                ]
            }, {
                "parallax.min.css": "parallax.less"
            }, {
                "blog.min.css": "blog.less"
            }, {
                "leap.min.css": "leap.less"
            }, {
                "livechatinc.min.css": "less/livechatinc.less"
            }, {
                "style-careers.min.css": "style-careers.css"
            }
        ]
    }
},

roboweaver avatar Jul 14 '16 14:07 roboweaver