commit
updates
emwow
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..3529d40
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,23 @@
+# .github/dependabot.yml
+
+version: 2
+
+updates:
+ # JavaScript dependencies (package.json + package-lock.json)
+ - package-ecosystem: "npm"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ open-pull-requests-limit: 10
+
+ # Base images in the Dockerfile (build + runtime stages)
+ - package-ecosystem: "docker"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+
+ # Actions used by the workflows in .github/workflows
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
\ No newline at end of file
diff --git a/src/icons.ts b/src/icons.ts
index 7e1de41..ed64aaa 100644
--- a/src/icons.ts
+++ b/src/icons.ts
@@ -1,14 +1,9 @@
/* src/icons.ts */
-//
-// Inline pixel icons, read straight from the installed `pixelarticons` package
-// (MIT, © 2019 Gerrit Halfmann). No icon paths are copied into this repo, so
-// the set always matches the installed version. esbuild keeps the package
-// external (see scripts/build.mjs) and it ships as a runtime dependency, so
-// getIconSvg resolves its svg/ files in dev and in the Docker image alike.
+// Icons are read from the installed pixelarticons package (MIT); none copied in.
import { getIconSvg } from "pixelarticons";
-// Parsed icon source, cached per name so each file is read once per process.
+// Parsed icon source, cached so each file is read once per process.
const cache = new Map<string, { viewBox: string; body: string }>();
function parse(name: string): { viewBox: string; body: string } {
@@ -35,9 +30,7 @@ function parse(name: string): { viewBox: string; body: string } {
return parsed;
}
-// Render one icon as an inline SVG string. `name` is any pixelarticons name
-// (kebab-case, e.g. "git-branch", "folder", "lock"). Colour follows the
-// parent's `currentColor`; the `.icon` class is styled in app.css.ts.
+// Render one pixelarticons icon (kebab-case name) as an inline SVG string.
export function icon(name: string, size = 16): string {
const { viewBox, body } = parse(name);
return `<svg class="icon" viewBox="${viewBox}" width="${size}" height="${size}" aria-hidden="true">${body}</svg>`;
diff --git a/src/markdown.ts b/src/markdown.ts
index 3102749..72c3973 100644
--- a/src/markdown.ts
+++ b/src/markdown.ts
@@ -1,4 +1,20 @@
/* src/markdown.ts */
+//
+// A small, deliberately safe Markdown renderer for repository READMEs.
+//
+// Why hand-rolled rather than a library: README content is attacker-controlled
+// — anyone who can push, on a repo that may be public — so this renderer is
+// escape-first. Every character is HTML-escaped before any markup is produced,
+// raw HTML from the source is never passed through, and link/image URLs go
+// through a scheme allowlist. Injection is impossible by construction instead
+// of depending on a sanitiser staying in step with a parser.
+//
+// Covers the README subset: ATX/setext headings, fenced and indented code,
+// blockquotes, nested and task lists, GFM tables, rules, images, links,
+// autolinks, emphasis, inline code, hard line breaks. Raw HTML blocks are
+// dropped rather than shown as escaped source.
+
+import { icon } from "./icons.ts";
export function escapeHtml(s: string): string {
return s
@@ -115,22 +131,21 @@ const QUOTE = /^\s{0,3}>/;
// GitHub alert marker: the whole first line of a blockquote, nothing else.
const ALERT = /^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/i;
-// Inline octicon SVGs, keyed by alert kind. Self-contained: no icon pack,
-// no external request, in keeping with this renderer's escape-first design.
+// Pixel icon per alert kind (names from the pixelarticons set).
const ALERT_ICON: Record<string, string> = {
- note: '<svg class="md-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>',
- tip: '<svg class="md-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>',
- important: '<svg class="md-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',
- warning: '<svg class="md-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',
- caution: '<svg class="md-alert-icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>',
+ note: "info-box",
+ tip: "lightbulb",
+ important: "flag",
+ warning: "warning-diamond",
+ caution: "square-alert",
};
function alertBlock(kind: string, body: string[]): string {
const key = kind.toLowerCase();
const label = key.charAt(0).toUpperCase() + key.slice(1);
- const icon = ALERT_ICON[key] ?? "";
+ const glyph = icon(ALERT_ICON[key] ?? "info-box");
const inner = blocks(body);
- const title = `<p class="md-alert-title">${icon}${label}</p>`;
+ const title = `<p class="md-alert-title">${glyph}${label}</p>`;
return `<div class="md-alert md-alert-${key}">\n${title}\n${inner}\n</div>`;
}
diff --git a/src/styles/app.css-1.ts b/src/styles/app.css-1.ts
deleted file mode 100644
index 91145a0..0000000
--- a/src/styles/app.css-1.ts
+++ /dev/null
@@ -1,474 +0,0 @@
-/* src/styles/app.css.ts
- *
- * Component classes. Each is a generated, scoped class name (zero runtime).
- * Imported as a single `classes` object by the HTML views.
- */
-
-import { globalStyle, style } from "@vanilla-extract/css";
-import { vars } from "./theme.css";
-
-const readme = style({
- margin: "1rem 0",
- padding: "1rem 1.25rem",
- background: vars.surface,
- border: `1px solid ${vars.border}`,
- borderRadius: vars.radius,
- overflowWrap: "break-word",
-});
-
-export const classes = {
- readme,
-
- siteHeader: style({
- display: "grid",
- gridTemplateColumns: "1fr auto 1fr",
- alignItems: "center",
- gap: "1rem",
- padding: "0.75rem 1.25rem",
- borderBottom: `1px solid ${vars.border}`,
- background: vars.bgRaised,
- }),
-
- siteTitle: style({
- display: "flex",
- alignItems: "center",
- gap: "0.5rem",
- fontWeight: 700,
- fontSize: "1.1rem",
- color: vars.text,
- }),
-
- siteLogo: style({
- width: "1.5rem",
- height: "1.5rem",
- borderRadius: 0,
- objectFit: "cover",
- }),
-
- siteWho: style({
- display: "flex",
- justifyContent: "center",
- minWidth: 0,
- }),
-
- siteNav: style({
- display: "flex",
- alignItems: "center",
- justifyContent: "flex-end",
- gap: "0.75rem",
- }),
-
- navLink: style({ color: vars.accent }),
-
- user: style({
- display: "flex",
- alignItems: "center",
- gap: "0.4rem",
- minWidth: 0,
- color: vars.textMuted,
- whiteSpace: "nowrap",
- overflow: "hidden",
- textOverflow: "ellipsis",
- }),
-
- avatar: style({
- position: "relative",
- flexShrink: 0,
- display: "inline-flex",
- alignItems: "center",
- justifyContent: "center",
- borderRadius: 0,
- background: vars.surfaceHi,
- color: vars.textSoft,
- fontWeight: 600,
- lineHeight: 1,
- overflow: "hidden",
- userSelect: "none",
- }),
-
- avatarSm: style({
- width: "25px",
- minWidth: "25px",
- maxWidth: "25px",
- height: "25px",
- minHeight: "25px",
- maxHeight: "25px",
- fontSize: "13px",
- }),
-
- avatarLg: style({
- width: "60px",
- minWidth: "60px",
- maxWidth: "60px",
- height: "60px",
- minHeight: "60px",
- maxHeight: "60px",
- fontSize: "30px",
- }),
-
- avatarImg: style({
- position: "absolute",
- inset: 0,
- width: "100%",
- height: "100%",
- objectFit: "cover",
- }),
-
- profileHead: style({
- display: "flex",
- alignItems: "center",
- gap: "1rem",
- margin: "0.5rem 0 1.5rem",
- }),
-
- profileName: style({
- fontSize: "1.4rem",
- margin: 0,
- }),
-
- ownerLink: style({ color: vars.textMuted }),
-
- content: style({
- maxWidth: "960px",
- margin: "0 auto",
- padding: "1.25rem",
- }),
-
- pageTitle: style({
- fontSize: "1.4rem",
- margin: "0.25rem 0 1rem",
- }),
-
- sectionTitle: style({
- fontSize: "1.05rem",
- margin: "1.5rem 0 0.5rem",
- color: vars.textSoft,
- }),
-
- repoList: style({}),
-
- repoRow: style({}),
-
- repoName: style({ fontWeight: 600 }),
-
- repoDesc: style({ color: vars.textMuted }),
-
- repoVis: style({
- fontFamily: vars.mono,
- fontSize: "0.85em",
- color: vars.textDim,
- }),
-
- repoIdle: style({
- fontFamily: vars.mono,
- fontSize: "0.85em",
- color: vars.textDim,
- whiteSpace: "nowrap",
- }),
-
- repoTabs: style({
- display: "flex",
- gap: "0.5rem",
- margin: "0.75rem 0",
- }),
-
- tab: style({
- padding: "0.2rem 0.7rem",
- border: `1px solid ${vars.border}`,
- borderRadius: vars.radius,
- color: vars.textSoft,
- }),
-
- tabActive: style({
- background: vars.surfaceHi,
- color: vars.text,
- fontWeight: 600,
- }),
-
- cloneBox: style({
- margin: "1rem 0",
- padding: "0.6rem 0.9rem",
- background: vars.surface,
- border: `1px solid ${vars.border}`,
- borderRadius: vars.radius,
- }),
-
- cloneLabel: style({
- color: vars.textMuted,
- marginRight: "0.5rem",
- }),
-
- commitList: style({}),
-
- commitDate: style({
- fontFamily: vars.mono,
- fontSize: "0.85em",
- color: vars.textDim,
- whiteSpace: "nowrap",
- }),
-
- commitSubject: style({}),
-
- commitAuthor: style({ color: vars.textMuted }),
-
- commitHash: style({
- fontFamily: vars.mono,
- fontSize: "0.85em",
- color: vars.textDim,
- }),
-
- treeList: style({}),
-
- treeMode: style({
- fontFamily: vars.mono,
- fontSize: "0.85em",
- color: vars.textDim,
- }),
-
- treeName: style({}),
-
- treeSize: style({
- fontFamily: vars.mono,
- fontSize: "0.85em",
- color: vars.textDim,
- textAlign: "right",
- }),
-
- code: style({
- display: "block",
- padding: "0.75rem 1rem",
- background: vars.surface,
- border: `1px solid ${vars.border}`,
- borderRadius: vars.radius,
- fontSize: "0.85rem",
- color: vars.textSoft,
- }),
-
- commitMeta: style({
- display: "grid",
- gridTemplateColumns: "max-content 1fr",
- gap: "0.2rem 1rem",
- margin: "0.75rem 0",
- }),
-
- binaryNotice: style({ color: vars.textMuted }),
-
- message: style({ color: vars.textMuted }),
-
- badge: style({
- display: "inline-block",
- padding: "0.05rem 0.4rem",
- marginLeft: "0.4rem",
- borderRadius: 0,
- border: `1px solid ${vars.border}`,
- background: vars.surfaceHi,
- fontFamily: vars.mono,
- fontSize: "0.75em",
- color: vars.textMuted,
- verticalAlign: "middle",
- }),
-
- formRow: style({
- display: "flex",
- flexWrap: "wrap",
- alignItems: "center",
- gap: "0.5rem",
- }),
-
- grow: style({
- flex: "1 1 12rem",
- minWidth: 0,
- }),
-
- revPicker: style({
- display: "flex",
- flexWrap: "wrap",
- alignItems: "center",
- gap: "0.5rem",
- margin: "0.75rem 0",
- }),
-
- empty: style({ color: vars.textDim }),
-
- statusGood: style({ color: vars.success }),
- statusWarn: style({ color: vars.accent }),
- statusBad: style({ color: vars.danger }),
- statusMuted: style({ color: vars.textDim }),
-
- mirrorRow: style({
- display: "grid",
- gridTemplateColumns: "minmax(5rem, auto) minmax(9rem, auto) auto 1fr",
- gap: "0.5rem 1rem",
- alignItems: "baseline",
- padding: "0.3rem 0",
- "@media": {
- "screen and (max-width: 40rem)": {
- gridTemplateColumns: "1fr",
- gap: "0.1rem",
- paddingBottom: "0.6rem",
- },
- },
- }),
-
- mirrorKind: style({ color: vars.textSoft, fontWeight: 600 }),
-
- siteFooter: style({
- color: vars.textDim,
- textAlign: "center",
- padding: "2rem 0",
- fontSize: "0.85em",
- }),
-} as const;
-
-globalStyle(`${readme} > :first-child`, { marginTop: 0 });
-globalStyle(`${readme} > :last-child`, { marginBottom: 0 });
-
-globalStyle(
- `${readme} h1, ${readme} h2, ${readme} h3, ${readme} h4, ${readme} h5, ${readme} h6`,
- {
- fontWeight: 600,
- lineHeight: 1.25,
- margin: "1.5rem 0 0.75rem",
- },
-);
-
-globalStyle(`${readme} h1`, { fontSize: "1.5rem" });
-globalStyle(`${readme} h2`, { fontSize: "1.25rem" });
-globalStyle(`${readme} h3`, { fontSize: "1.05rem" });
-globalStyle(`${readme} h4, ${readme} h5, ${readme} h6`, {
- fontSize: "0.95rem",
- color: vars.textSoft,
-});
-
-globalStyle(`${readme} h1, ${readme} h2`, {
- paddingBottom: "0.3rem",
- borderBottom: `1px solid ${vars.border}`,
-});
-
-globalStyle(`${readme} p`, { margin: "0.75rem 0" });
-
-globalStyle(`${readme} code`, {
- background: vars.surfaceHi,
- padding: "0.12em 0.35em",
- borderRadius: 0,
- fontSize: "0.9em",
-});
-
-globalStyle(`${readme} pre`, {
- margin: "0.75rem 0",
- padding: "0.75rem 1rem",
- background: vars.bgDeep,
- border: `1px solid ${vars.border}`,
- borderRadius: vars.radius,
- overflowX: "auto",
-});
-
-globalStyle(`${readme} pre code`, {
- background: "none",
- padding: 0,
- borderRadius: 0,
- fontSize: "0.85rem",
- color: vars.textSoft,
-});
-
-globalStyle(`${readme} blockquote`, {
- margin: "0.75rem 0",
- padding: "0.1rem 0 0.1rem 1rem",
- borderLeft: `3px solid ${vars.border}`,
- color: vars.textMuted,
-});
-
-// GitHub-style alerts: one accent colour per kind.
-const alertColor = {
- note: "#4493f8",
- tip: "#3fb950",
- important: "#ab7df8",
- warning: "#d29922",
- caution: "#f85149",
-};
-
-globalStyle(`${readme} .md-alert`, {
- margin: "0.75rem 0",
- padding: "0.5rem 1rem",
- borderLeft: `3px solid ${vars.border}`,
- borderRadius: vars.radius,
- color: vars.textSoft,
-});
-
-globalStyle(`${readme} .md-alert > :first-child`, { marginTop: 0 });
-
-globalStyle(`${readme} .md-alert > :last-child`, { marginBottom: 0 });
-
-globalStyle(`${readme} .md-alert-title`, {
- display: "flex",
- alignItems: "center",
- gap: "0.4rem",
- margin: "0 0 0.5rem",
- fontWeight: 600,
-});
-
-globalStyle(`${readme} .md-alert-icon`, {
- flexShrink: 0,
- fill: "currentColor",
-});
-
-for (const [kind, color] of Object.entries(alertColor)) {
- globalStyle(`${readme} .md-alert-${kind}`, {
- borderLeftColor: color,
- });
-
- globalStyle(`${readme} .md-alert-${kind} .md-alert-title`, {
- color,
- });
-}
-
-globalStyle(`${readme} ul, ${readme} ol`, {
- margin: "0.75rem 0",
- paddingLeft: "1.5rem",
-});
-
-globalStyle(`${readme} li`, { margin: "0.25rem 0" });
-
-globalStyle(`${readme} li > input[type="checkbox"]`, {
- marginRight: "0.35rem",
-});
-
-globalStyle(`${readme} hr`, {
- border: 0,
- borderTop: `1px solid ${vars.border}`,
- margin: "1.5rem 0",
-});
-
-globalStyle(`${readme} img`, {
- maxWidth: "100%",
- verticalAlign: "middle",
-});
-
-globalStyle(`${readme} table`, {
- display: "block",
- width: "max-content",
- maxWidth: "100%",
- overflowX: "auto",
- margin: "0.75rem 0",
-});
-
-globalStyle(`${readme} th[data-align="center"], ${readme} td[data-align="center"]`, {
- textAlign: "center",
-});
-
-globalStyle(`${readme} th[data-align="right"], ${readme} td[data-align="right"]`, {
- textAlign: "right",
-});
-
-globalStyle(`${readme} del`, { color: vars.textDim });
-
-// Inline pixel icons: crispEdges keeps the pixel grid sharp at any size.
-globalStyle(".icon", {
- display: "inline-block",
- verticalAlign: "middle",
- flexShrink: 0,
- fill: "currentColor",
- shapeRendering: "crispEdges",
-});
-
-export type Classes = typeof classes;
diff --git a/src/styles/app.css.ts b/src/styles/app.css.ts
index ccb268d..b448480 100644
--- a/src/styles/app.css.ts
+++ b/src/styles/app.css.ts
@@ -378,8 +378,7 @@ globalStyle(`${readme} blockquote`, {
color: vars.textMuted,
});
-// GitHub-style alerts. One accent colour per kind drives the left border,
-// the title text, and the icon fill.
+// GitHub-style alerts: one accent colour per kind.
const alertColor = {
note: "#4493f8",
tip: "#3fb950",
@@ -408,11 +407,6 @@ globalStyle(`${readme} .md-alert-title`, {
fontWeight: 600,
});
-globalStyle(`${readme} .md-alert-icon`, {
- flexShrink: 0,
- fill: "currentColor",
-});
-
for (const [kind, color] of Object.entries(alertColor)) {
globalStyle(`${readme} .md-alert-${kind}`, {
borderLeftColor: color,
@@ -463,8 +457,7 @@ globalStyle(`${readme} th[data-align="right"], ${readme} td[data-align="right"]`
globalStyle(`${readme} del`, { color: vars.textDim });
-// Inline pixel icons (see src/icons.ts). crispEdges keeps the pixel grid
-// sharp at any size; currentColor lets a parent's colour token drive the fill.
+// Inline pixel icons: crispEdges keeps the pixel grid sharp at any size.
globalStyle(".icon", {
display: "inline-block",
verticalAlign: "middle",
diff --git a/src/styles/global.css-1.ts b/src/styles/global.css-1.ts
deleted file mode 100644
index 2a56196..0000000
--- a/src/styles/global.css-1.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Global element styling — the parts that must target bare elements (html,
- * body, a, table, pre) rather than a generated class, so they live in
- * globalStyle exactly like the personal site's base.css.ts.
- */
-
-import { globalStyle } from "@vanilla-extract/css";
-import { vars } from "./theme.css";
-
-globalStyle("*", { boxSizing: "border-box" });
-
-globalStyle("html", {
- background: `linear-gradient(135deg, ${vars.bg} 0%, ${vars.bgRaised} 60%, ${vars.bgDeep} 100%)`,
- minHeight: "100%",
-});
-
-globalStyle("body", {
- margin: 0,
- minHeight: "100vh",
- fontFamily: vars.font,
- fontSize: "15px",
- lineHeight: 1.5,
- color: vars.text,
- cursor: "url('/static/cursors/default-dark.png') 4 1, default",
-});
-
-globalStyle("a", {
- color: vars.accent,
- textDecoration: "none",
-});
-
-globalStyle("a:hover", { textDecoration: "underline" });
-
-// Self-hosted pixel cursor (dark art, since dough-git is always dark).
-globalStyle("a, button", {
- cursor: "url('/static/cursors/pointer-dark.png') 12 1, pointer",
-});
-
-globalStyle("h1, h2, h3", {
- fontWeight: 600,
- lineHeight: 1.25,
-});
-
-globalStyle("table", {
- width: "100%",
- borderCollapse: "collapse",
-});
-
-globalStyle("th, td", {
- textAlign: "left",
- padding: "0.4rem 0.6rem",
- borderBottom: `1px solid ${vars.border}`,
- verticalAlign: "top",
-});
-
-globalStyle("th", {
- color: vars.textMuted,
- fontWeight: 600,
- fontSize: "0.85em",
-});
-
-globalStyle("code, pre", { fontFamily: vars.mono });
-
-globalStyle("pre", {
- margin: 0,
- overflowX: "auto",
-});
diff --git a/src/styles/global.css.ts b/src/styles/global.css.ts
index 7a6590c..2a56196 100644
--- a/src/styles/global.css.ts
+++ b/src/styles/global.css.ts
@@ -30,9 +30,7 @@ globalStyle("a", {
globalStyle("a:hover", { textDecoration: "underline" });
-// Pixel cursors, self-hosted from public/cursors/ (served at /static/cursors/).
-// dough-git is always dark, so the dark cursor art is the plain default.
-// The trailing keyword is the fallback if the image is ever missing.
+// Self-hosted pixel cursor (dark art, since dough-git is always dark).
globalStyle("a, button", {
cursor: "url('/static/cursors/pointer-dark.png') 12 1, pointer",
});
diff --git a/test/icons.test.mjs b/test/icons.test.mjs
index b25842b..2db72f0 100644
--- a/test/icons.test.mjs
+++ b/test/icons.test.mjs
@@ -1,10 +1,6 @@
-// Tests for the inline icon helper.
-//
-// icon() reads from the installed pixelarticons package at call time, so these
-// checks pin the contract views.ts relies on: a real icon name yields one
-// <svg> that inherits colour and stays crisp, the size argument is honoured,
-// and an unknown name fails loudly rather than rendering nothing.
-//
+/* test/icons.test.mjs */
+
+// Pins the contract views.ts relies on from icon().
// Run: node --experimental-strip-types test/icons.test.mjs
import { icon } from "../src/icons.ts";
diff --git a/test/markdown.test.mjs b/test/markdown.test.mjs
index 299a8a2..8a22663 100644
--- a/test/markdown.test.mjs
+++ b/test/markdown.test.mjs
@@ -79,7 +79,7 @@ check(
);
check(
"note alert includes an inline icon",
- has("> [!NOTE]\n> Heads up.", 'class="md-alert-icon"'),
+ has("> [!NOTE]\n> Heads up.", 'class="icon"'),
);
check(
"tip alert",