peterbe/minimalcss

TypeError: Cannot read property 'forEach' of undefined

quasiperfect opened this issue · 4 comments

hi

what could trigger that error ?

i got this issue testing on http://codingheads.com/

Caused by:

@-moz-document url-prefix() {
	inputtype:radio],input[type=checkbox]{vertical-align:middle;
	margin-top:-.3em
}
}

Which is parsed to

{ type: 'Raw',
  loc: null,
  value: 'inputtype:radio],input[type=checkbox]' }

Resolution: we need to handle invalid CSS, ideally output error with url and line

@stereobooster thanks for your help. that would be great(handle invalid CSS)

This error actually found a ton of invalid crap in our production CSS!

I raised a PR that spits out the invalid CSS: #237

fixed in #237