locked
[WPSL]LESS CSS in WindowsPhone 8 HTML5 app RRS feed

  • Question

  • Hello,

    In my WP8 HTML5 app I am trying to use LESS CSS. It works properly in a WEB app (with the same configuration), but not in WP8.

    Maybe a problem is in absent of a mimeType .less for the WebBrowser? Can I check it somehow? Or the problem is in something else?

    Monday, July 27, 2015 9:03 PM

Answers

  • Hello leozel,

    Please read the sticky posts, especially the Guide to posting: subject line tags

    (https://social.msdn.microsoft.com/Forums/windowsapps/en-US/b479e984-ca39-4b34-a6b7-85194b54d8bd/guide-to-posting-subject-line-tags?forum=wpdevelop )

    Since less is third party library I would suggest that you confirm first that it supports Windows Phone 8 (http://lesscss.org/usage/index.html#browser-support)

    #1. Are you including the .less file directly into the head?

    #2. I suggest you do not directly add the .less file into the header as per described at this link (http://lesscss.org/#client-side-usage )

    “Client-side is the easiest way to get started and good for developing with Less, but in production, when performance and reliability is important, we recommend pre-compiling using node.js or one of the many third party tools available.”

    #3. So I also suggest you could use lessc to compile the .less file into .css and then include it. Please see: http://lesscss.org/usage/index.html#command-line-usage

    Default command for compilation is

    lessc [option option=parameter ...] <source> [destination]

    4. There is also less.js using that you can compile programmatically using less.render function. ( http://lesscss.org/usage/index.html#programmatic-usage )

    With Regards,

    Krunal Parekh



    Tuesday, July 28, 2015 2:50 AM