[docmaker] Format field lists with CSS. This also simplifies the inserted HTML code. * src/tools/docmaker/tohtml.py (HtmlFormatter::print_html_field_list): Do it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
diff --git a/ChangeLog b/ChangeLog
index 8f455c3..6aa3ae9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-11-28 Werner Lemberg <wl@gnu.org>
+
+ [docmaker] Format field lists with CSS.
+
+ This also simplifies the inserted HTML code.
+
+ * src/tools/docmaker/tohtml.py
+ (HtmlFormatter::print_html_field_list): Do it.
+
2014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Fix compiler warning to the comparison between signed and
@@ -6,14 +15,14 @@
* src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison
between `ypos + ysize' and FT_INT_{MAX,MIN}.
-2014-11-27 Werner Lemberg <wl@gnu.org>
+2014-11-28 Werner Lemberg <wl@gnu.org>
- [docmaker] Replace empty `<td>' with CSS..
+ [docmaker] Replace empty `<td>' with CSS.
* src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do
it.
-2014-11-27 Werner Lemberg <wl@gnu.org>
+2014-11-28 Werner Lemberg <wl@gnu.org>
[docmaker] Replace some `<table>' tags with `<h4>' and `<div>'.
diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py
index 4e18a04..44544cc 100644
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -76,13 +76,24 @@ html_header_2 = """\
color: darkblue; }
table.center { margin: auto; }
+ table.fields { border: 0;
+ border-spacing: 0; }
+ table.fields td.val { font-weight: bold;
+ text-align: right;
+ width: 30%;
+ vertical-align: text-top;
+ padding: 0 1em 0 0; }
+ table.fields td.desc { vertical-align: text-top;
+ padding: 0 0 0 1em; }
table.index { margin: auto;
border: 0;
border-collapse: separate;
border-spacing: 1em 0.3ex; }
table.index tr { padding: 0; }
table.index td { padding: 0; }
- table.index-toc-link { width: 100%; }
+ table.index-toc-link { width: 100%;
+ border: 0;
+ border-spacing: 0; }
table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
font-size: 83%;
text-align: left; }
@@ -390,18 +401,11 @@ class HtmlFormatter( Formatter ):
def print_html_field_list( self, fields ):
print "<p></p>"
- print '<table cellpadding="3" border="0">'
+ print '<table class="fields">'
for field in fields:
- if len( field.name ) > 22:
- print( '<tr valign="top"><td colspan="0"><b>'
- + field.name
- + "</b></td></tr>" )
- print '<tr valign="top"><td></td><td>'
- else:
- print( '<tr valign="top"><td><b>'
- + field.name
- + "</b></td><td>" )
-
+ print ( '<tr><td class="val">'
+ + field.name
+ + '</td><td class="desc">' )
self.print_html_items( field.items )
print "</td></tr>"
print "</table>"