Style fixes; moving away from contain: content to avoid cutting off hover boxes.

This commit is contained in:
Ludwig Schubert
2017-11-14 12:52:34 -08:00
parent d0463ff769
commit 3a643ab7ad
14 changed files with 57 additions and 32 deletions
+1 -2
View File
@@ -1,11 +1,10 @@
import { Template } from '../mixins/template';
import { body } from '../helpers/layout';
const T = Template('d-appendix', `
<style>
d-appendix {
contain: content;
contain: layout style;
font-size: 0.8em;
line-height: 1.7em;
margin-top: 60px;
+1 -2
View File
@@ -2,8 +2,7 @@ import { bibliography_cite } from '../helpers/citation';
const styles = `
d-citation-list {
contain: content;
overflow: hidden;
contain: layout style;
}
d-citation-list .references {
+18 -1
View File
@@ -38,6 +38,21 @@ d-hover-box {
margin-top: 1.9em;
}
ul {
margin: 0;
padding: 0;
list-style-type: none;
}
ul li {
padding: 15px 10px 15px 10px;
border-bottom: 1px solid rgba(0,0,0,0.1)
}
ul li:last-of-type {
border-bottom: none;
}
</style>
<d-hover-box id="hover-box"></d-hover-box>
@@ -106,7 +121,9 @@ export class Cite extends T(HTMLElement) {
set entries(entries) {
if (this.hoverBox) {
this.hoverBox.innerHTML = entries.map(hover_cite).join('<br><br>');
this.hoverBox.innerHTML = `<ul>
${entries.map(hover_cite).map(html => `<li>${html}</li>`).join('\n')}
</ul>`;
}
}
+1 -2
View File
@@ -4,8 +4,7 @@ const T = Template('d-footnote-list', `
<style>
d-footnote-list {
contain: content;
overflow: hidden;
contain: layout style;
}
d-footnote-list > * {
+2 -2
View File
@@ -20,6 +20,8 @@ const T = Template('d-hover-box', `
.panel {
position: absolute;
font-size: 1rem;
line-height: 1.5em;
top: 0;
left: 0;
width: 100%;
@@ -27,11 +29,9 @@ const T = Template('d-hover-box', `
background-color: rgb(250, 250, 250);
box-shadow: 0 0 7px rgba(0, 0, 0, 0.1);
border-radius: 4px;
padding: 10px;
box-sizing: border-box;
}
</style>
<div class="container">
+1 -1
View File
@@ -20,7 +20,7 @@ export function renderTOC(element, headings) {
<style>
d-toc {
contain: content;
contain: layout style;
display: block;
}