Daniel Dekany wrote:
> I think it's safe to say that the typically used XSL-s (for HTML and
> PDF output) use similar vertical margin (vertical spacing) around
> listitem elements than around para elements. But the default CSS used
> for editing in XXE doesn't have vertical margin around the listitem-s,
> only around the itemziedlist/orderedlist. It should have, except if
> the spacing attribute of the parent itemziedlist/orderedlist element
> is "compact".
This is not a bug or even an omission. Unlike one of our respectable
competitors, we *really* don't try to mimic what is done by the XSL
style sheets.
The goal of our CSS is simply to have on screen a document
* which is readable,
* whose structure/semantic is easy to understand.
What you suggest does not make listitems substantially easier to read or
easier to understand.
A counterexample would be supporting the "continuation" attribute of an
orderedlist.
> I have quickly fixed it for myself by modifying
> $XXE_HOME/addon/config/docbook/css/docbook1.imp and docbook2.imp so
> now itemziedlist/orderedlist doesn't have a margin, instead the
> listitems-s have, except if the spacing attribute of its parent is
> "compact", in which case there is no margin. Something like (but I
> don't really know CSS):
>
> itemizedlist {
> display: block;
> margin-left: 2ex;
> }
>
> listitem {
> display: block;
> margin-top: 1.33ex;
> margin-bottom: 1.33ex;
> }
>
> itemizedlist[spacing=compact] > listitem {
> display: block;
> margin-top: 0ex;
> margin-bottom: 0ex;
> }
>
> ...
>
> orderedlist {
> display: block;
> margin-left: 2ex;
> border: thin solid #0000FF;
> }
>
> ...
>
> orderedlist[spacing=compact] > listitem {
> display: block;
> margin-top: 0ex;
> margin-bottom: 0ex;
> }
>
> Now it certainly should be further improved, because if I put the
> itemizedlist/ordered into a para (<para>Blah
> blah<itemziedlist>...</itemizedlist></para>) instead of after it, and
> in additional spacing="compact", then now will be no vertical space
> between the paragraph and the first list item. I think there should
> be. Apart from this problem, what I see after this CSS modification is
> far closer to the typical output. And most importantly, now I see
> where did I set spacing="compact" without checking the Attributes tab.
We are happy to see that power users are not affraid to customize our
DocBook CSS style sheets to their own taste.