aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-12-19 16:59:43 +0000
committerSimon McVittie <smcv@debian.org>2016-12-19 18:21:07 +0000
commitcde2cc18624cb877cc9a9f43d7ae75fb1217008b (patch)
tree14ca2c33187489dfe97cbe33f576a3d9bbf06cdc
parent2a9e9f13f6583ba04bca06750373d462985c5ccb (diff)
downloadikiwiki-cde2cc18624cb877cc9a9f43d7ae75fb1217008b.tar
ikiwiki-cde2cc18624cb877cc9a9f43d7ae75fb1217008b.tar.gz
Restrict CSS matches on .header to not affect <tr>
Pandoc generates <tr class="header"> to hold <th> elements, and we don't want to make those be display: block. Signed-off-by: Simon McVittie <smcv@debian.org>
-rw-r--r--doc/bugs/style.css___40__unnecessarily__41___breaks_pandoc_table_headers.mdwn16
-rw-r--r--doc/style.css2
-rw-r--r--themes/actiontabs/style.css2
-rw-r--r--themes/monochrome/style.css2
4 files changed, 19 insertions, 3 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
index a667bfad9..aa4eec904 100644
--- 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
@@ -44,3 +44,19 @@ Alternatively, add the following code.
}
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 )
+
+> This is essentially a conflict between ikiwiki's expectations for the
+> definitions of CSS classes, and pandoc's expectations. The ikiwiki
+> templates use `class="header"` to mean essentially the same thing
+> as a HTML5 `<header>`, while Pandoc assumes a different meaning.
+>
+> I think `div.header, header.header {` is probably a cleaner fix,
+> and I have [[done]] that.
+>
+> FYI, `display: block` breaks the tables because it makes the `<tr>` not
+> be treated as a table row by the browser's layout engine.
+> `table-header` is not a valid
+> [value for the CSS `display` attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/display)
+> so that won't work.
+>
+> --[[smcv]]
diff --git a/doc/style.css b/doc/style.css
index f0846c0d6..8c16e7a2f 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -10,7 +10,7 @@ footer,header,hgroup,menu,nav,section {
display: block;
}
-.header {
+div.header, header.header {
margin: 0;
font-size: 140%;
font-weight: bold;
diff --git a/themes/actiontabs/style.css b/themes/actiontabs/style.css
index 67720e285..16e3d984e 100644
--- a/themes/actiontabs/style.css
+++ b/themes/actiontabs/style.css
@@ -51,7 +51,7 @@ body {
font-size: 120%;
}
-.header {
+div.header, header.header {
font-weight: normal;
}
diff --git a/themes/monochrome/style.css b/themes/monochrome/style.css
index e85f8abb5..aa2ee9445 100644
--- a/themes/monochrome/style.css
+++ b/themes/monochrome/style.css
@@ -19,7 +19,7 @@ body {
font-family: 'Lato', sans-serif;
}
-.header {
+div.header, header.header {
margin-bottom: 0.5em;
}
.pageheader .actions ul {