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>master
parent
2a9e9f13f6
commit
cde2cc1862
|
@ -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 )
|
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]]
|
||||||
|
|
|
@ -10,7 +10,7 @@ footer,header,hgroup,menu,nav,section {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
div.header, header.header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 140%;
|
font-size: 140%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -51,7 +51,7 @@ body {
|
||||||
font-size: 120%;
|
font-size: 120%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
div.header, header.header {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ body {
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Lato', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
div.header, header.header {
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
.pageheader .actions ul {
|
.pageheader .actions ul {
|
||||||
|
|
Loading…
Reference in New Issue