Skip to content

Instantly share code, notes, and snippets.

@ivanmendoza
Created February 12, 2012 04:16
Show Gist options
  • Save ivanmendoza/1806248 to your computer and use it in GitHub Desktop.
Save ivanmendoza/1806248 to your computer and use it in GitHub Desktop.
Toggle Less 'development' mode on local server
<?php if($_SERVER['SERVER_NAME']==="localhost"): ?>
<link rel="stylesheet/less" href="less/style.less" type="text/css" />
<script type="text/javascript">less = { env: 'development' };</script>
<script src="http://lesscss.googlecode.com/files/less-1.2.1.min.js"></script>
<?php else: ?>
<link rel="stylesheet" type="text/css" href="stylesheets/style.css">
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment