lessphp icon indicating copy to clipboard operation
lessphp copied to clipboard

@import full path in windows os broken

Open franmastromarino opened this issue 11 years ago • 3 comments

hello

I'm trying to use the full path in the import statements

this is the .less file:

@import "@{stylesheet_path}colors.less";
@import "@{template_path}liquida/etc.less";

i set the variables via php and i tried with

$test = strtr(realpath(dirname($output)), '', '/');

$test = realpath(dirname($output));

$test = dirname($output);


    $less->setVariables(array(
        'stylesheet_path'   => "'". $test ."/'",
        'template_path'     => "'". $test ."/'",
        'stylesheet_url'    => "'". $test ."/'",
        'template_url'      => "'". $test ."/'",
    ));

but less files are not imported & the output is allways the string of the folder

@import "C:/wamp/www/wordpress/wp-content/uploads/liquida/css/colors.less";
@import "C:/wamp/www/wordpress/wp-content/uploads/liquida/css/liquida/functions.less";

i think we have an issue here, or im doing something wrong ?

thanks!

franmastromarino avatar Feb 14 '14 17:02 franmastromarino

LESS does not support absolute paths as far as I know.

FMCorz avatar Feb 20 '14 08:02 FMCorz

I have same problem: cannot import less file using absolute path. Can anyone confirm that LESSPHP doesn't support absolute path for import?

rilwis avatar May 07 '14 18:05 rilwis

I have this bug too in v0.5.0

sylfabre avatar Feb 02 '15 15:02 sylfabre