]> gitweb.factorcode.org Git - factor.git/commitdiff
html.streams: cleanup borders on html tables.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Apr 2013 19:20:41 +0000 (12:20 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Apr 2013 19:20:41 +0000 (12:20 -0700)
basis/html/streams/streams.factor

index 37ad24daece682d16ff467e38154b3e4ed874909..8c718816a5d3961abaafdabccec868120de9837e 100644 (file)
@@ -129,14 +129,13 @@ M: html-block-stream dispose
     end-sub-stream format-html-div ;
 
 : border-spacing-css, ( pair -- )
-    "padding: " % first2 max 2 /i # "px; " % ;
+    first2 max 2 /i dup "padding: " % # "px " % # "px; " % ;
 
 : table-style ( style -- str )
     {
         { table-border border-css, }
         { table-gap border-spacing-css, }
-    } make-css
-    " border-collapse: collapse;" append ;
+    } make-css ;
 
 PRIVATE>
 
@@ -170,7 +169,7 @@ M: html-writer stream-write-table
             [ data>> [XML <td valign="top" style=<->><-></td> XML] ] with map
             [XML <tr><-></tr> XML]
         ] with map
-        [XML <table style="display: inline-table;"><-></table> XML]
+        [XML <table style="display: inline-table; border-collapse: collapse;"><-></table> XML]
     ] emit-html ;
 
 M: html-writer dispose drop ;