0

I am using less for creating css file. I am using this plugin

<?php
require "lessc.inc.php";
$less = new lessc;
$less->setVariables(array(
  "base" => "968px"
));
$less->checkedCompile("webform.less", "output.css");
?>

When I first compile this code... the base variable in webform.less is compiled and exact output is created. But when I edit base value and compile, it is not updating. Am I missing anything here in less compilation using php?

1 Answer 1

1

The checkedCompile() method compiles only if the input file is a different one or the output file does not already exist. You have to make use of the function compileFile() to compile it again and again..

The following code may do the trick..

<?php
require "lessc.inc.php";
$less = new lessc;
$less->setVariables(array(
  "base" => "968px"
));
$less->compileFile("webform.less", "output.css");
?>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.