Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pages/assets/css/wasmpatch.css
Original file line number Diff line number Diff line change
Expand Up @@ -234,26 +234,28 @@ a:hover { color: var(--accent); }
.doc__body tbody tr:hover { background: var(--bg-1); }
.doc__body td code { white-space: nowrap; }

/* ---- Code panels (rouge) ------------------------------------------------- */
.doc__body .highlight, .home .highlight {
/* ---- Code panels (rouge) -------------------------------------------------
kramdown emits BOTH <div class="highlight"> and <pre class="highlight">,
so the chrome is scoped to the container div to avoid drawing it twice. */
.doc__body div.highlight, .home div.highlight {
position: relative; margin: 1.4em 0; border-radius: var(--radius);
background: var(--code-bg); border: 1px solid var(--line-strong);
box-shadow: var(--shadow); overflow: hidden;
}
.doc__body .highlight::before, .home .highlight::before {
.doc__body div.highlight::before, .home div.highlight::before {
content: ""; display: block; height: 38px;
background: linear-gradient(var(--bg-3), color-mix(in srgb, var(--bg-3) 60%, transparent));
border-bottom: 1px solid var(--line);
}
.doc__body .highlight::after, .home .highlight::after {
.doc__body div.highlight::after, .home div.highlight::after {
content: ""; position: absolute; top: 15px; left: 16px;
width: 9px; height: 9px; border-radius: 50%;
background: var(--accent);
box-shadow: 16px 0 0 #f0c24a, 32px 0 0 var(--mint);
opacity: 0.9;
}
.highlight pre, .highlight code { background: none; margin: 0; }
.highlight pre {
div.highlight pre {
padding: 16px 18px 18px; overflow-x: auto;
font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.65; color: var(--code-ink);
}
Expand Down
2 changes: 1 addition & 1 deletion pages/assets/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
});

/* ---- Copy buttons on code blocks ---- */
document.querySelectorAll(".highlight").forEach(function (block) {
document.querySelectorAll("div.highlight").forEach(function (block) {
var pre = block.querySelector("pre");
if (!pre) return;
var btn = document.createElement("button");
Expand Down
Loading