Skip to content
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

@import_once 'filename.less'; #305

Open
kromped opened this issue Sep 12, 2012 · 2 comments
Open

@import_once 'filename.less'; #305

kromped opened this issue Sep 12, 2012 · 2 comments

Comments

@kromped
Copy link

kromped commented Sep 12, 2012

please implement this feature based on the official specs of: less/less.js#212

@Bluestreak2k5
Copy link

This is already implemented as we use it in one of our projects:

input.less has these lines:

@import "reset";
@import "mixins";
@import "common";
@import "site";

(Note: each of these are referencing .less files in the same folder, like mixins.less, site.less)

Then in the starting file you have this:

require 'lessc.inc.php';

try
{
if (array_key_exists('HTTP_HOST', $_SERVER))
{
if (stripos($_SERVER['REQUEST_URI'], 'admin') !== FALSE)
lessc::ccompile('less/admin.less', 'css/admin.css');
else
lessc::ccompile('less/input.less', 'css/site.css');
}

} catch (exception $ex) {
exit('lessc fatal error:
'.$ex->getMessage());
}

This creates 1 CSS file in our project that we reference in the header and it loads. Is this not what your asking for?

@akomm
Copy link

akomm commented Mar 24, 2013

Strange, but in my case it is not already implemented, i had to fix it: #396

I tried multiple versions, including the latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants