0

Basic Less CSS code works fine when run from local file system:

<link rel="stylesheet/less" href="style.less" type="text/css" />
<script src="less-1.0.21.min.js"></script>

But once I move my code to a HTTP server, Less CSS becomes unable to find the stylesheet file and all the styling gets broken. The server (App Engine) returns *.less as "octetstream" actually. I tried to copy "style.less" to "style.txt" but with no success.

What does Less CSS needs to work on servers?

1
  • I'm not 100% sure how less operates but my guess is that it uses ajax to fetch it and then parse it. So maybe it's a cross-domain issue? Commented Aug 3, 2011 at 13:24

1 Answer 1

4

That depends heavily on your http server. But you can map in most webservers suffixes to mime types per configuration.

In apache something like this could be a solution

AddType text/css .less

See mod_mime

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.