Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LESS and IE support(below 10)

Tags:

css

less

it's my first time here so i'm sorry if i make some mistakes.

I have a problem with LESS file being read by IE. It throws the following error:

'SyntaxError: Object doesn't support this property or method in test.less'

It's very nice special div with those words at the top of the page. Not in the debug, there is nothing, it's clean. All other browsers have no problem with this.

I try all day long and nothing. Now even i'm trying only with this LESS file: This is the test.less file.

body { margin: 0 auto; background-color:red; }

So nothing fancy, right. But still nothing. So i guess there is an issue that i'm not aware of. But what?

Here is my snip from the head:

<link rel="stylesheet/less" type="text/css" href="src/showcase/Presentation/Css/test.less" />    
    <script src="src/showcase/Presentation/Script/less.js"></script>
    <script src="src/showcase/Presentation/Script/main.js"></script>

By the way in IE 10 it works.

I would really appreciate a helpful hint.

like image 638
user2626205 Avatar asked Jan 18 '26 15:01

user2626205


1 Answers

According to the website, LESS does not officially support any version of Internet Explorer.

  • "LESS runs on the client-side (modern browsers only)." [the LESS website]
  • "IE9 is not officially supported – it may or may not work." [LESS author]

I recommend compiling your .less files to CSS and referencing those files across all browsers. You can use a tool such as SimpLESS to monitor your .less files and automatically compile them when changes are detected.

like image 75
Graham Swan Avatar answered Jan 20 '26 04:01

Graham Swan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!