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

Paul DeBruicker pdebruic at gmail.com
Sun Dec 25 17:33:50 UTC 2011


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>



But I also don't know that leaving out those declarations will cause any 
problems.




On 11-12-24 01:12 PM, Boris Popov, DeepCove Labs wrote:
> Paul,
>
> I'd recommend feature detection instead of browser detection; see
> http://www.modernizr.com/.
>
> -Boris
>
> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Paul
> DeBruicker
> Sent: Saturday, December 24, 2011 3:40 PM
> To: Seaside - general discussion
> Subject: [Seaside] conditionally change the class of the html document
> for IE
>
> Hi -
>
> Is there a way to use the conditionally  set the class on the<html>  tag
> in Seaside if the browser is an internet explorer variant?
>
> aRoot if ie7; do:[aRoot htmlAttributes addClass:'ie7'].
>
> sets the class to 'ie7' no matter what browser is accessing the page.
>
> thanks in advance
>
> Paul
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list