aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorkarsk <karsk@web>2016-09-27 09:22:47 -0400
committeradmin <admin@branchable.com>2016-09-27 09:22:47 -0400
commit0d5d26defae546652d4e0938c66795ba6eab4b51 (patch)
treee7fa18fc1e6dbe86266938ef8981130c9c82c299 /doc
parentae8862d08761abcb9ad8d11f8e1f533ce43d137a (diff)
downloadikiwiki-0d5d26defae546652d4e0938c66795ba6eab4b51.tar
ikiwiki-0d5d26defae546652d4e0938c66795ba6eab4b51.tar.gz
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/style.css___40__unnecessarily__41___breaks_pandoc_table_headers.mdwn46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/bugs/style.css___40__unnecessarily__41___breaks_pandoc_table_headers.mdwn b/doc/bugs/style.css___40__unnecessarily__41___breaks_pandoc_table_headers.mdwn
new file mode 100644
index 000000000..a667bfad9
--- /dev/null
+++ b/doc/bugs/style.css___40__unnecessarily__41___breaks_pandoc_table_headers.mdwn
@@ -0,0 +1,46 @@
+This may, strictly speaking, be a bug in the [[plugins/contrib/pandoc]] plugin, but I think it would be better to fix it in ikiwiki because of its kind (and maybe because I believe/hope pandoc will become the markdown dialect standard). For all I know it might not only affect pandoc tables.
+
+When creating a simple table in pandoc-flavoured markdown,
+
+ 1 2
+ --- ---
+ 3 4
+
+pandoc converts this to the html code
+
+ <table>
+ <thead>
+ <tr class="header">
+ <th align="left">1</th>
+ <th align="left">2</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="odd">
+ <td align="left">3</td>
+ <td align="left">4</td>
+ </tr>
+ </tbody>
+ </table>
+
+`<tr class="header">` causes it to be affected by `style.css`'s
+
+ .header {
+ margin: 0;
+ font-size: 140%;
+ font-weight: bold;
+ line-height: 1em;
+ display: block;
+ }
+
+(more specifically by `display: block;`), which results in all header cells to cramp together in the first column.
+
+The fix is easy: In `style.css` change `.header {` to `.header tr:not(.header) {`.
+
+Alternatively, add the following code.
+
+ tr.header {
+ display: table-row;
+ }
+
+I've added that last code snippet to my `custom.css` file. I admit `.header tr:not(.header)` is not especially elegant, but then again, I have almost no knowledge of CSS. There might be better solutions. (I don't even know why `display: block;` breaks the tables or why changing it to `display: table-header;` doesn't fix it but `display: table-row;` does :D )