-
Notifications
You must be signed in to change notification settings - Fork 40
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
i can't get the right instance of WPLessCompiler in WPLessPlugin #51
Comments
Is there somewhere on github I can see the full code for WPLessCompiler and WPLessPlugin? Everything I've found so far has leafo's lessphp compiler. |
@oyejorge yes, see here https://github.com/bassjobsen/wp-lesscss. It will work to compile a simple LESS file (also Bootstrap's latest version), but i found some problems trying implement setVariables(). NB https://github.com/bassjobsen/wp-less-to-css also use less.php here all works as expected. |
Sorry, nothing is jumping out at me. You mentioned wp-less-to-css is working as expected using less.php. Does that mean it's working with multiple calls to parse()? |
Okay, thanks for checking!! Yes multiple calls seems not the problem. |
@bassjobsen is it also the behaviour of Otherwise, it is fixable. |
@oncletom good suggestion, i will check that soon! thanks |
Fine, let us know your findings :-) |
I try to add https://github.com/oyejorge/less.php to compile, see also https://github.com/bassjobsen/wp-lesscss
in my functions.php i define:
with addVariable in WPLessPlugin:
and
$this->compiler->parse seems to set Less_Parser->rules but will be reset after every call to addVariable();
Calling
$this->parse()
inside Less_Parser->getCss() works as expected.For me it seems addVariable creates a new instance of WPLessCompiler every time and i don't understand why.
Hope you can help.
The text was updated successfully, but these errors were encountered: