[TYPO3-templavoila] Using conditional comments in TV

Jan Wulff messages at janwulff.de
Mon Jun 5 18:55:13 CEST 2006


Hi,

>> If you create template according to standards, you will not 
>> need conditional comments.
> 
> This is not really true. You are much more likely to encounter the 
> /really/ weird IE bugs /while/ developing according to standards.
Exactly.

> Given the number of _fixable_ rendering bugs in various versions of IE 
> Windows, you will eventually need to use conditional comments--they are, 
> for example, the simplest way to deliver a separate box-model stylesheet 
> to IE 5, or to set 'width' for IE while using 'min-width' for other 
> browsers.
> 
> They're also nice to use because they rely on the targeted browser 
> itself to deliver alternate info--no need for complex browser-sniffing 
> tools or even TS conditions.
Seeing the chaos IE 7 is about to spread, most of the well-known css sites
have recommended their users to use conditional comments in the future.

> Not that I think the inability to use them in the Templavoila GUI is a 
> big problem; as everyone always points out, you can just stick them in 
> the TS:
> 
> page.headerData.5 = HTML
> page.headerData.5 {
>    value = @import url(IE_5.css);
>    value.wrap = <!--[if IE 5]><style type="text/css"> | </style><![endif]-->
> }
No, that doesn't work with TV because this is displayed before the TV
output in the html head. To overwrite all other (preceding) propertys, it
has to display after all other stylesheet definitions.

Best Regards
Jan



More information about the TYPO3-project-templavoila mailing list