[Seaside] conditionally change the class of the html document for IE

Philippe Marschall philippe.marschall at gmail.com
Tue Dec 27 17:56:54 UTC 2011

2011/12/25 Paul DeBruicker <pdebruic at gmail.com>:
> Thanks Boris, your suggestion is a good one.
> I'm trying to replicate the head section of the Skeleton
> (http://www.getskeleton.com) responsive grid framework example index.html
> file.  I was going to put it, and Twitter Bootstrap
> (http://twitter.github.com/bootstrap/), Gridless
> (http://thatcoolguy.github.com/gridless-boilerplate/) and 320AndUp
> (http://stuffandnonsense.co.uk/projects/320andup/) up on squeaksource. Nick
> Ager's Seafox has been super handy for this by the way.
> Because I'm just making Seaside versions of those CSS frameworks, I don't
> want to add modernizr if I can help it.  The relevant part of the file is:
> <!DOCTYPE html>
> <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
> <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
> <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
> <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
> <head>

That's a bit tricky. A possible way may be to create a custom
WAHtmlElement (bad class name BTW) subclass, override #encodeOn: and
then output the string above. And then maybe a convenience method on
WAHtmlRoot to add it (see #meta).


More information about the seaside mailing list