Web Analytics Made Easy -
StatCounter LESS css: Just can't get it to work. - CodingForum

Announcement

Collapse
No announcement yet.

LESS css: Just can't get it to work.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LESS css: Just can't get it to work.

    After reading an article in Smashing Magazine, I was really excited about trying out LESS css. Unfortunately, I just can't get the darn thing to work.

    Here's what I've got in my HTML:
    Code:
    <link rel="stylesheet/less" type="text/css" href="style/style.less" />
    <script src="js/less.js" type="text/javascript"></script>
    My browser won't read the stylesheet at all. And I'm getting no error codes.

    I've been searching through forums, and I have messed around a lot trying to get it to work. I thought it might be an issue on my server, and tried adding a .less MIME type (though I don't know too much about MIME types and the like...). I also tried changing the style file to 'style.less.css' with no luck.

    I'm at a loss right now. I can't find too many other people having this problem. I'd really appreciate any thoughts.

  • #2
    Try:

    Code:
    <link rel="stylesheet" type="text/css" href="style/style.css" />
    Not sure their CSS link tag will work. Be sure relative paths are correct. The LESS CSS is compiled using JavaScript so you may not need the CSS link tag.
    Last edited by Major Payne; Aug 25, 2011, 02:32 AM.
    ☠ ☠RON☠ ☠

    Comment


    • #3
      Thanks, but I have tried changing the extension of my stylesheet to '.css', and also .'less.css'. nada.

      So I wrote to my hosting company and here's what they said.

      From what I've read on their website, you would need to install LESS using the npm, which requires root access, and that is not something we give access to on our shared hosting service.
      Maybe that's the case. I just didn't want to have to use node, as I already use jquery, and I feel like having two js libraries is just one too many.

      In a second email, he wrote:
      I found flaw in that script that would be the reason why it's not working. We do not have Java installed on our Linux Servers, so Apache would not be able to process Java scripts
      Hmm.. methinks he is confusing Java with javascript.
      BTW, I'm usually very happy with the support at hostmonster (you can even talk to a real person on the phone (!) ) but maybe I shouldn't be asking them questions about scripts....

      Anyways, I've gotten around the whole problem by using lessPhp, with a little help from a set-up tutorial from net.tuts+.

      Comment


      • #4
        I hadn't seen this LESS solution before, but it seems to nicely handle the fiddly flaws with CSS being static. I've done CSS pages in PHP before, but apparently that was "rolling my own" versus LESS which provides this nice syntax.

        Do you, or anyone else, have opinions about the future of LESS? i.e. whether it might be considered in some future version of "real css"? I'm tempted to jump on board, but worry about getting off the standards path.

        Dave

        Comment


        • #5
          whether it might be considered in some future version of "real css"?
          I for one certainly hope so! I read this article as well and really would be excited for this to be fully integrated in future standards.

          We code everyday for dynamic page content, why then cant we incorporate dynamic css into our designs? Seems like a logical progression to me.
          Teed

          Comment


          • #6
            I use less.php and it rocks! Just the fact that you can use variables takes everything a step further as far as reusable code. allowing us to use mathematics makes using em-font sizes super easy! This should definitely be fully integrated someday.
            WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.

            Comment

            Working...
            X