HTML and CSS Reference
In-Depth Information
Also note that the print modules of IE seem not to be affected
by our JavaScript voodoo, so pages which are styled on the
screen do not carry those styles to the printer. IE Print Protector
( http://www.iecss.com/print-protector/ ) is a piece of JavaScript
that allows you to print HTML5 pages in IE. (This is also included
in Remy's HTML5 shiv.) A user with JavaScript turned off, whether
by choice or corporate security policy, will be able to access
your content but will see a partially styled or unstyled page. This
may or may not be a deal-breaker for you. Simon Pieters has
shown that, if you know what the DOM looks like, you can style
some HTML5 without JavaScript but it's not particularly scalable
or maintainable; see “Styling HTML5 markup in IE without script”
at  http://blog.whatwg.org/styling-ie-noscript .
Styling HTML5 in old versions
of Firefox and Camino
Firefox and Camino both use the Gecko rendering engine,
which had a bug that wouldn't render HTML5 unless it was per-
fect XHTML and served as XML. Firefox 3+ and Camino 2 use a
more up-to-date version of Gecko that has fi xed this bug, and
users of those browsers upgrade frequently so this is much less
of a problem than the IE weirdness.
NOTE See Remy's
HTML5doctor article
“How to get HTML5 working
in IE and Firefox 2” at http://
html5doctor.com/how-to-get-
html5-working-in-ie-and-fire-
fox-2/ for more information.
Other legacy browser problems
There are other legacy browser problems when styling HTML5.
In some circumstances, setting a background colour on ele-
ments does nothing unless you explicitly set the background-
color to inherit on the children, even though that is supposedly
the default behaviour. In some Gecko-based browsers, styling
block-level anchors (that is, <a> elements that surround block-
level elements as HTML5 now allows—see Chapter 2, “Text”)
can be problematic, and in all current browsers you must explic-
itly set such anchors to be display:block —see
http://mattwilcox.net/sandbox/html5-block-anchor/test.html .
We don't propose to compose an exhaustive list of these behav-
iours; they are temporary problems that we expect quickly to
disappear as new versions come out. If, as an early-adopter
developer, you come across such bugs, you might wish to fi le
a bug report; John Resig has a good article on how to do this:
“A   We b D e v e l o p e r 's Re s p o n s i b i l i t y ” a t http://ejohn.org/blog/
a-web-developers-responsibility/ .
 
Search WWH ::




Custom Search