Integrated data table styles from 0.2.x

This commit is contained in:
squidfunk
2016-12-18 13:29:03 +01:00
parent be2532d47f
commit 2c8a324324
19 changed files with 1284 additions and 1093 deletions

View File

@@ -59,6 +59,19 @@ export default class Application {
/* Attack FastClick to mitigate 300ms delay on touch devices */
FastClick.attach(document.body)
/* Wrap all data tables */
const tables = document.querySelectorAll("table:not([class])")
for (const table of tables) {
const wrap = document.createElement("div")
wrap.classList.add("md-typeset__table")
if (table.nextSibling) {
table.parentNode.insertBefore(wrap, table.nextSibling)
} else {
table.parentNode.appendChild(wrap)
}
wrap.appendChild(table)
}
}).listen()
/* Cross-browser helper to dispatch/fire an event */