:root {
--dark: #333;
--light: #f8f8f8;
}
body {
font-family: 'Segoe UI', sans-serif;
padding: 1rem 2rem;
margin: 0;
}
t-b {
display: block;
margin: 0.75rem 0;
max-width: 50em;
}
view-code component. Clicking on the code body makes it wider.
Clicking on the title makes it narrower.
highlight="prism" attribute switches to Prism mode, which expects
a <pre slot="code"><code> structure in the light DOM.
VC_STYLE for the CSS and VC_TEMPLATE for the HTML structure.
<pre><code> pair for the
plain-text path and a named slot (slot="code") for the Prism path.
CSS attribute selectors on :host([highlight="prism"]) toggle which one
is visible.
slotchange to react when
slotted content is assigned or replaced.
_renderDefault(), _maybeSetupPrism(),
_resolveDisplayEl(), _harmonizeBox(),
_applyBoxColors(), _applySizing(),
_applyTypography(), and _stripCommonIndent().