[Typo3-dev] any extension developers need html/css templating?

Zach Davis zach at crito.org
Wed Nov 17 14:38:50 CET 2004


The cooperation that Ben refers to was a good experience for me too -- 
when I started the forum, I didn't know squat about writing well formed, 
valid xhtml. After working with Ben, I make a real effort to write 
better code. I still think that tables can be better at some things than 
divs, and I'll generally use a table instead of divs or lists if I feel 
that positioning the latter will take forever -- but in many many cases, 
I think divs are far superior to tables.

Just the other day, for example, I was customizing the CMW link list 
extension -- that's a great extension overall, but all the HTML is based 
on table layouts, which just doesn't make sense, IMO. I think it's far 
easier to wrap content in descriptive div tags and add some padding and 
margins with CSS than to hack it into a table and figure out the 
colspans and whatnot.

My advice to other coders is to listen to Ben and to try to work with a 
designer to make better templates. I don't have any interest in being a 
purist; I do have an interest in writing better code and making my 
extension easier to customize, and I think modern HTML + CSS is 
absolutely the way to go. Speaking as a recent convert, I don't have any 
regrets, and I rarely find myself wanting to go back to tables.

best,
Zach

ben van 't ende [netcreators] wrote:
> Kasper Skårhøj wrote:
> 
>> I'm curiuos.
>>
>> - What is complex about the CSS in the extensions? (examples)
>> - What is the difference between "complex" and "sophisticated" CSS
>> (which you propose is better)?
> 
> 
> 
> Hi,
> 
> What is meant here is that a lot of classes are involved in some of the 
> extensions. That is why it is so cool if the extension has an external 
> template you can manipulate yourself as a non programmer. I had a very 
> good cooperation with Zach Davis this way. I modified the template to be 
> semantically correct and implemented classes and id's where needed. A 
> lot of stuff can be manipulated generically from a container div 
> (div.forum h3 {color: red; font-size: 24px; margin: 0;}). In the case of 
> chc_forum I included some colors and other values as constants that is 
> written to an inline style which in it's turn is transformed into an 
> external css file. So if you are lucky someone will have provided you 
> with a proper setup. If you are not that lucky there will be at least a 
> template you can layout yourself and where you have to add styles 
> yourself. I have gotten used to preparing several stylesheets like 
> extensions.css, csc.css and main.css. With the right comment inside the 
> stylesheet it is not that difficult to manipulate your layout. If the 
> person that built the extension coded everything in php files you have a 
> serious problem. I have written to several extension authors asking them 
> to change that. They see the advantage, but that is probably not done 
> overnight and the extension most likely suits there particular needs.
> 
> Bottomline is that you have to spent time to learn something. TYPO3 is a 
> good example. The benefits of css-coding your layout in a webstandards 
> way are so evident that I feel you HAVE to spent some time to learn 
> this. You can start out with very easy CSS and get into more complex 
> stuff later. That is the good thing. It is very scalable. The biggest 
> benefit is that you are no longer building your webpages only for a 
> browser, but for devices that are able to display webpages like 
> cellphones or what have you. It is very easy to manipulate your css to 
> get a print stylesheet or get your display right for the visually impaired.
> 
> gRTz
> 
> ben




More information about the TYPO3-dev mailing list