Published
Edited
Feb 7, 2022
Importers
5 stars
Insert cell
Insert cell
{
var styles = getComputedStyle(document.documentElement);
var teWidth = styles.getPropertyValue('width');
console.log('styles ',styles)

console.log('teWidth ',teWidth)
}
Insert cell
md`selector #app > div > main > div.flex.w-100.mw8.center
needs to be changed to
#app > div > main > div.flex.w-100.mw9.center

/html/body/div[1]/div/main/div[8] (xpath)

document.querySelector("#app > div > main > div.flex.w-100.mw9.center")
`
Insert cell
parent.document.getElementById('app')
Insert cell
window.document.getElementById('app')
Insert cell
// #app > div > main > div.flex.w-100.mw9.center

// document.documentElement.style.setProperty('width', '98rem');
Insert cell
<style>

.katex-display,p,ul,h1,h2,h3,h4,li
{
font-family: sans-serif;
}

@media (hover: hover) {
.katex-display,p,ul,h1,h2,h3,h4,li {
max-width: 1100px;
min-width: $1100px; }
}
</style>
Insert cell
Insert cell
bootstrap = html`<link rel="stylesheet" href="${await FileAttachment('bootstrap@1.css').url()}">`
Insert cell
Insert cell
import {Table} from "@observablehq/inputs"
Insert cell
import {penguins} from "@observablehq/input-table"
Insert cell
Table(penguins)
Insert cell
html`<style>
td:nth-child(2) {
background-color: rgba(211,211,211,0.5);
}
td:nth-child(4) {
background-color: rgba(211,211,211,0.5);
}
td:nth-child(6) {
background-color: rgba(211,211,211,0.5);
}
td:nth-child(8) {
background-color: rgba(211,211,211,0.5);
}
</style>
`
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more