h5bp/mobile-boilerplate — Issue #99: CSS parse error on Nokia S40 and S60
Author: sergiolopes
Created: 2012-02-25 20:23:41+00:00
State: open

A very strange parse error on style.css prevents everything after the affected line to be applied, rendering an unstyled page.

It's a @page declaration inside the @media print part of the file. This line:

@page { margin: 0.5cm; }

If we remove this line, everything works fine. Other solution is to move this declaration outside the @media print block (affecting all media types, but since this is a paged media declaration, I guess it's not a problem).

One last solution is to put this declaration as the last one in your CSS file. But I guess a common use case is to put the custom styles after MBP style.css (I did that and lost a few ours debugging). We could put a big warning telling people to use this line as the last one, but I prefer to just remove this.

---

Tested on Nokia's emulators for S40 6th edition, S60 5th edition and S60 3.2. Also tested on a real N95 device with S60 3.1.