Loading...
 
Development

Development


Simplifying stylesheets and templates

posts: 179 France

Hi, I recently set up a new TW website for an organization, and for that occasion I wanted to make a brand new css. However I rapidly had to give up because it consumed 100% of my webmasters's time and made me several days late in delivery.

I'm not claimling I am extremely good or extremely bad at css, I think you could consider me a landmark for the active volunteer maybe. That is, if I have difficulties, then everybody below computer sciences degree will have difficulties.

To be more precise, I found the numbers of entries in the css to be monstruous. Given the amount of time I had it was like a mountain. I have seen other portals where the number of entries is reduced.

Now, another problem is that the templates will sometimes contradict what you want to do through the css. There seems to be too many tables in the templates for instance.

There are also surprising things, such as header div not being in tiki-main. Which means I had to specify the same background, width and so on two times. Maybe it sounds logical to you, but when I had read in the css that tiki-main encompasses the whole TW app, I had understood that meant the header too.

In the same way, I didn't expect that the footer could be in tiki-mid. I thought the footer was... below.

Last, as usual a reaction in that sort of criticism is to say "you just have to tweak the templates". That's a choice of development. Mine is to make the css author the master of the display.

posts: 4656 Japan

Hi,

I'm pretty sure there will be some serious efforts to simplify the CSS and template files, hopefully before the next major release. This has been talked about in a very preliminary way so far, but people are motivated to do it.

One generally agreed idea is to basically separate the css selectors into "layout.css" to control position and function, etc., and "design.css" to control coloring, text details and other asthetic things. This should greatly simplify theme-making; maybe in many cases "layout.css" wouldn't even have to be looked at.

Another focus will be to simplify the css that is used, by replacing things like feature-specific classes and ids with global ones, so one specification in the css file will cover more cases.

Actually, there has already been some improvement in the files, in 2.0. The new themes are generally more efficient than the old ones (usually totalling around 45KB, compared to up to 100KB for some of the old themes, and this is even with the new ones including a lot of new lines for new features such as Ajax, etc. And the template files have also been improved, although there's still a lot to do.

Finally, the documentation needs to be improved. Right now we're sort of at a transition point with both the older themes and new themes in the package, and they have quite different approaches. By the next release, the files will be much more consistent across themes and so documenting will be easier.

Well, I don't know if Tiki will ever match most CMSs in terms of CSS compactness, due to the complexity and variety of Tiki's features. But we can certainly improve things a lot, and I do expect this to happen relatively soon.

-- Gary - zukakakina.com themes.tw.o


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting