Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-04

[patch] fpdoc.css now has "definition list" formatting

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I wrote some CSS formatting for "definition list" tags for the fpdoc HTML output. This makes the <dl>, <dt> and <dd> tags look much better. Below is a before and after example.

http://www.freepascal.org/docs-html/rtl/sysutils/formatfloat.html vs
http://lazarus-ccr.sourceforge.net/docs/rtl/sysutils/formatfloat.html

Here is another example:
http://lazarus-ccr.sourceforge.net/docs/rtl/sysutils/formatchars.html

Could somebody please add the following CSS code to the end of the fpdoc.css file (that's if you prefer the new formatted definition lists). Also if this change is accepted, is there a program (maybe fpdoc itself) that generates the fpdoc.css file that needs patching as well. I don't mind doing the patching, I just need to know what program generates the default fpdoc.css file - if any.

============================
/* definition list */
dl {
border: 3px double #ccc;
padding: 0.5em;
}

/* definition list: term */
dt {
 float: left;
 clear: left;
 width: auto; /* normally browsers default width of largest item */
 padding-right: 20px;
 font-weight: bold;
 color: darkgreen;
}

/* definition list: description */
dd {
margin: 0 0 0 110px;
padding: 0 0 0.5em 0;
}

============================

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 18 lines
Hi, I wrote some CSS formatting for "definition list" tags for the fpdoc HTML output. This makes the <dl>, <dt> and <dd> tags look much better. Below is a before and after example. http://www.freepascal.org/docs-html/rtl/sysutils/formatfloat.html vs http://lazarus-ccr.sourceforge.net/docs/rtl/sysutils/formatfloat.html Here is another example: http://lazarus-ccr.sourceforge.net/docs/rtl/sysutils/formatchars.html Could somebody please add the following CSS code to the end of the fpdoc.css file (that's if you prefer the new formatted definition lists).

I'll adapt the file.

Also if this change is accepted, is there a program (maybe fpdoc itself) that generates the fpdoc.css file that needs patching as well. I don't mind doing the patching, I just need to know what program generates the default fpdoc.css file - if any.

The fpdoc.css file is hand-generated. I doubt you can patch me, I'm beyond repair ;)

Michael.

Show quoted text 38 lines
============================ /* definition list */ dl { border: 3px double #ccc; padding: 0.5em; } /* definition list: term */ dt { float: left; clear: left; width: auto; /* normally browsers default width of largest item */ padding-right: 20px; font-weight: bold; color: darkgreen; } /* definition list: description */ dd { margin: 0 0 0 110px; padding: 0 0 0.5em 0; } ============================ Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote 6 lines
> > Could somebody please add the following CSS code to the end of the > fpdoc.css file (that's if you prefer the new formatted definition > lists). I'll adapt the file.

Thanks Michael.

The fpdoc.css file is hand-generated. I doubt you can patch me, I'm beyond repair ;)

:-) After I sent the message I found the "default" utils/fpdoc/fpdoc.css file and noticed the hand-generated comment in the file.

PS:
I'm quite impressed. After all the years that nobody maintained the 'fpde' GTK1 project, it still compiled without problems. Robust code! :-) That project (idea) would actually make an excellent OOP and Mediators example project. XML reading and writing, objects could be used for tree node sections, reusable GUI parts (as objects) all tied together with MGM and Observers. Ummm... one for a rainy day.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Micha Nelissen
Micha Nelissen wrote
The box around doesn't make much sense to me, now it seems like it's a separate entity while it is part of the paragraph/text.

The reason I used a border is because it's a listing similar to what is used in articles or programming manuals. In the latter 2 cases they normally use some form of a table structure. I met in the middle with the border showing that it's a list of definitions and opted not to use a too striking border colour like back. So the light grey blends in better with the rest of the default colour scheme of fpdoc.css.

If you don't like the border in your own documentation, you can always edit your copy of fpdoc.css and simply remove the "border" property in the "dl" CSS definition. After all, the fpdoc.css is simply a starting point for users - it would be nice seeing different colour schemes or designs (though I always like blue-ish themes).

PS:
I always code my CSS by hand. Anybody know if there is a WYSIWYG CSS editor (preferably a free one).

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email