Created
September 25, 2013 14:57
-
-
Save abdollahpour/6700852 to your computer and use it in GitHub Desktop.
Convert LESS to CSS with PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "lessc.inc.php"; | |
$css_file = 'test.css'; | |
if(!file_exists($css_file)) { | |
$less_file = preg_replace('"\.css$"', '.less', $css_file); | |
$less = new lessc; | |
$less->checkedCompile($less_file, $css_file); | |
} | |
?> | |
<html> | |
<link href="<?php echo $css_file ?>" rel="stylesheet" type="text/css" /> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.block { padding: 3 + 4px } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment