Why won't LESS work on IE8?

I have been playing for some time, but I can’t LESS work in IE 8!
I made a very simple page to check it out.

Here is the HTML ...

<!DOCTYPE html> <html> <head> <link rel="stylesheet/less" href="css/v1.less"> <script src="js/jquery.js"></script> <script src="js/less.js"></script> </head> <body>hello world!</body> </html> 

Here is ME ...

 @base_colour:red; body { background:@base_colour; } 

This works with Firefox, but not on IE 8.

jQuery works fine since I tested changing the background with $('body').css() and it worked in IE 8 without any problems.

I tried adding type="text/css" tags to link tags and reverting to old school documents, but that doesn't matter.
Any pointers?

+4
source share
1 answer

On lesscss.org in the chapter section you can read

LESS runs both on the server side (with Node.js and Rhino) and on the client side (only for modern browsers).

I think IE8 is not a modern browser .;)

Here is some interesting information: http://starikovs.com/2012/11/27/does-less-js-support-ie-9-at-least/

The author of LESS says:

IE9 is not officially supported - it may or may not work.

+11
source

Source: https://habr.com/ru/post/1500147/


All Articles