in JavaScript

@Styles.Render ”Index was outside the bounds of the array”

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0Email this to someone

I just love when these things happens, I hade just started up a new project, added som basic logic, domain models, ioc contanier, and so on. Just to se that everything rocks as it should I started up the application, and I get this:

styles.render index out of range

Say what?

After some googling I can see that a few other people have had the same problem, theirs solution was to update  Microsoft Web Optimization & WebGrease.
Well I have the latest, so it cant be that.

In the error message I can see pretty easy it’s the CssParser in Microsoft.Ajax.Utilities that is getting the index out of range exception.
Some more googling and it seams like the CssParser has some problems reading the ”_:” selector inside the css file.

I had these lines: (in one of the css files that was included in the bundle)

_:-ms-fullscreen,
:root input[type=”date”],
_:-ms-fullscreen,
:root input[type=”time”],
_:-ms-fullscreen,
:root input[type=”datetime-local”],
_:-ms-fullscreen,
:root input[type=”month”] {
line-height: 1.42857143;
}
_:-ms-fullscreen.input-sm,
:root input[type=”date”].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type=”time”].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type=”datetime-local”].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type=”month”].input-sm {
line-height: 1.5;
}
_:-ms-fullscreen.input-lg,
:root input[type=”date”].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type=”time”].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type=”datetime-local”].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type=”month”].input-lg {
line-height: 1.33;

By taking them away everything worked.

I’m using a already finished bootstrap template (as I don’t have the eye for design)
I dont care about this css as it’s just for the fullscreen mode in internet explorer. I didnt know this even exsisted so thanks for this error I now know what the _:-ms-fullscreen does.

 

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0Email this to someone

Write a Comment

Comment

  1. This was very helpful.
    Looks like when I added bootstrap datepicker, and bootstrap.css got updated with ms-fullscreen. Once I commented them. My web app is working fine now :)