tables for arguments, constructors, fields, and instances
nominolo at googlemail.com
Wed Jul 21 08:26:33 EDT 2010
Ok, I hacked up another version that mostly does what it should. It
uses definition lists and float:left/right to get the desired effect.
The only downside is that I had to use percentage values for the width
and that this needs a dummy <div class="clear"> after the <dl> in
order to attach a "clear:both" to it and thus have the parent surround
all of the <dl>.
On 21 July 2010 06:53, Mark Lentczner <markl at glyphic.com> wrote:
>> I was wondering whether really want to keep the table in the argument list.
> This whole discussion applies equally to arguments, constructors. fields, and instances. These four constructs use tables to achieve side-by-side layout of the declarations in one column and their documentation in second, aligned column.
>> On the one hand it allows a very compact and neat layout when all the argument types are short. However, when the argument names get longer
> I'm quite a fan of compact and neat! I like the side-by-side presentation given much more than separate lines for everything which takes up twice as much vertical space. I like to see as much interface at a time as I can!
> It is true, XHTML/CSS just doesn't have enough oomph to style this in a way that works in the rather large variety of cases we find in the field. That said, seems like most Haddock doc looks good with the side-by-side layout for.
> One idea is to have to code make a heuristic judgement: arguments, etc. whose lengths are greater than 125%(?) of the average have their documentation moved to a new row in the table.
>> I think I like it. Google does something similar [argument documentation on a separate line] in its API docs. For examples, see:
> Indeed, the documentation on that page takes quite a bit of room for what it does!
>> Changing from tables would mean that we intend to launch the improved haddock with a new stylesheet as the old style would be hard to emulate without using tables.
>> I suppose you could hack something up using display:table-cell etc, but I don't think it's very portable.
> It would not be. In fact, if you go back to definition lists for these things, then you can't style it as a table even on CSS3 conforming browsers: There is no element to hang the display:table-row on.
> - Mark
> Haddock mailing list
> Haddock at projects.haskell.org
If it looks like a duck, and quacks like a duck, we have at least to
consider the possibility that we have a small aquatic bird of the
family Anatidae on our hands.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haddock