OdfKit Hack Week day 2


Today was a day of style in the OdfKit Hack Week. Enjoying the sun with style. Watching a soccer game with style. Watching the chicken spagetti races with style and most importantly adding a touch of style to OdfKit cum suis.

We ended the morning slightly listless because lists style in CSS is not as easy as we’d like. The CSS code I gave for lists yesterday was not tested and seemed correct to me, but neither WebKit, nor Firefox liked it much. After much ado with counter-reset and counter-increment we discovered that, for now, the simple

may offer the most satisfactory solution for now.

Another big topic today was style inheritance. In ODF, like in polite society, style is something you mostly inherit from your parents. This contrasts with CSS which has no notion of inheritance. Let us look at a simple example with a Title and Subtitle style.

is now converted to these CSS rules:

The selector for the first rule has a match to the style ‘Subtitle’ added. The statements in there are partly overridden by the CSS rule below it. So here too, it is possible to map ODF styles to CSS.


By the way, the order of the rules is important here. Later rules may override earlier rules. This is different from CSS.

umpire chair I’m chairing the cloud session at Akademy and hosting the OdfKit BOF!


Post a comment