[TYPO3-templavoila] html comments and TV

Franz Koch typo.removeformessage at fx-graefix.de
Fri Jan 25 16:11:18 CET 2008


Hi Dmitry,

>> well, when it's the only clean way to get it working without hacking 
>> the core, I don't care about official statements (don't get this wrong 
>> - it's not ment against you Dmitry).
> 
> Your approach with CSS in TS works as soon as you have one template per 
> DS. This is ok for simple sites. But for big sites with sevral templates 
> per DS (or several representations of the same page using different 
> templates) this does not always work. This is why header selection is 
> there. You are free to do it your own way, of course ;)

yes, on complex sites with many different DS this might not always work. 
But in my case I put all the CSS for any template in one CSS file, so it 
only has to be loaded once and get's cached by the browser.

>> Writing the filter-stuff in the regular CSS makes the CSS invalid. And 
>> in fact I'm really sick of using the '* html' hack with extra hacks 
>> for IE Mac or whatever. A conditional comment is just perfect for it. 
>> No extra pages in cache like with TS browser conditions - just one 
>> simple template, nicely separated css files with all hacks and 
>> modifications in one place, and one location where the header data is 
>> created.
> 
> I still do not understand why people need to use hacks in the work in 
> standards mode. The only serious difference is png transparency but that 
> can be handled with filter and does not require separate file.

actually I don't use hacks unless I really found no other solution for 
it - I don't like them either. As for the png transparency bug in IE. If 
you write the filter-stuff inside your regular CSS (which is possible 
without any doubt), then the W3C-CSS parser marks your css as invalid. 
Some might not care about that, but if you have customers that strictly 
wanna have valid documents, then you might exclude it from regular css. 
And that's where the conditional comments get involved. This 'nonvalid' 
css stuff simply is put to a seperate CSS file and only provided for IE.
And when I have a separate css for IE anyway, I also put every other css 
bugfix for IE into it, like probably correcting the 3px float bug or 
using other properties forcing to use different boxmodel handling or 
whatever, so that I don't have to use '* html onlyforIE' stuff.

>> If somebody knows a better way to achieve this for different versions 
>> of IE and not flooding the cache tables with TS-browser-conditions - 
>> I'm always willing to learn.
> 
> Can you give me an example: what requires hacks? I wonder if I can make 
> it without hacks :)

As I wrote - in 99% I don't use hacks - I just need a conditional 
comment for some IE5 (yes, I still care about that) and IE6 fixes.

--
Greetings,
Franz


More information about the TYPO3-project-templavoila mailing list