Add not-prose to all code blocks to enforce stone-100 background
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m32s

Tailwind's prose class applies dark backgrounds to pre/code elements,
overriding the intended bg-stone-100. Adding not-prose to every code
container div across docs, specs, and examples pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 14:35:49 +00:00
parent a0e39f0014
commit 631394989c
4 changed files with 12 additions and 12 deletions

View File

@@ -8,7 +8,7 @@
(defcomp ~doc-oob-code (&key target-id text) (defcomp ~doc-oob-code (&key target-id text)
(div :id target-id :sx-swap-oob "innerHTML" (div :id target-id :sx-swap-oob "innerHTML"
(div :class "bg-stone-100 rounded p-4 mt-3" (div :class "not-prose bg-stone-100 rounded p-4 mt-3"
(pre :class "text-sm whitespace-pre-wrap break-words" (pre :class "text-sm whitespace-pre-wrap break-words"
(code text))))) (code text)))))
@@ -146,13 +146,13 @@
forms)))) forms))))
(defcomp ~doc-special-form-card (&key name syntax doc tail-position example) (defcomp ~doc-special-form-card (&key name syntax doc tail-position example)
(div :class "border border-stone-200 rounded-lg p-4 space-y-3" (div :class "not-prose border border-stone-200 rounded-lg p-4 space-y-3"
(div :class "flex items-baseline gap-3" (div :class "flex items-baseline gap-3"
(code :class "text-lg font-bold text-violet-700" name) (code :class "text-lg font-bold text-violet-700" name)
(when (not (= tail-position "none")) (when (not (= tail-position "none"))
(span :class "text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700" "TCO"))) (span :class "text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700" "TCO")))
(when (not (= syntax "")) (when (not (= syntax ""))
(pre :class "bg-stone-50 rounded px-3 py-2 text-sm font-mono text-stone-700 overflow-x-auto" (pre :class "bg-stone-100 rounded px-3 py-2 text-sm font-mono text-stone-700 overflow-x-auto"
syntax)) syntax))
(p :class "text-stone-600 text-sm whitespace-pre-line" doc) (p :class "text-stone-600 text-sm whitespace-pre-line" doc)
(when (not (= tail-position "")) (when (not (= tail-position ""))

View File

@@ -160,7 +160,7 @@
(div :class "space-y-3" (div :class "space-y-3"
(h2 :class "text-2xl font-semibold text-stone-800" "Dependency graph") (h2 :class "text-2xl font-semibold text-stone-800" "Dependency graph")
(div :class "bg-stone-100 rounded-lg p-5 mx-auto max-w-3xl" (div :class "not-prose bg-stone-100 rounded-lg p-5 mx-auto max-w-3xl"
(pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words font-mono text-stone-700" (pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words font-mono text-stone-700"
"parser.sx (standalone — no dependencies) "parser.sx (standalone — no dependencies)
primitives.sx (standalone — declarative registry) primitives.sx (standalone — declarative registry)
@@ -254,7 +254,7 @@ deps.sx depends on: eval (optional)")))
(p :class "text-stone-600" (get spec "desc")) (p :class "text-stone-600" (get spec "desc"))
(when (get spec "prose") (when (get spec "prose")
(p :class "text-sm text-stone-500 leading-relaxed" (get spec "prose"))) (p :class "text-sm text-stone-500 leading-relaxed" (get spec "prose")))
(div :class "bg-stone-100 rounded-lg p-5 max-h-72 overflow-y-auto" (div :class "not-prose bg-stone-100 rounded-lg p-5 max-h-72 overflow-y-auto"
(pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words" (pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words"
(code (highlight (get spec "source") "sx")))))) (code (highlight (get spec "source") "sx"))))))
spec-files)))) spec-files))))
@@ -274,7 +274,7 @@ deps.sx depends on: eval (optional)")))
(p :class "text-xs text-stone-400 italic" (p :class "text-xs text-stone-400 italic"
"The s-expression source below is the canonical specification. " "The s-expression source below is the canonical specification. "
"The English description above is a summary."))) "The English description above is a summary.")))
(div :class "bg-stone-100 rounded-lg p-5 mx-auto max-w-3xl" (div :class "not-prose bg-stone-100 rounded-lg p-5 mx-auto max-w-3xl"
(pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words" (pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words"
(code (highlight spec-source "sx")))))) (code (highlight spec-source "sx"))))))
@@ -350,7 +350,7 @@ deps.sx depends on: eval (optional)")))
" spec files (parser, eval, primitives, render, adapters, engine, orchestration, boot, cssx) " " spec files (parser, eval, primitives, render, adapters, engine, orchestration, boot, cssx) "
"and emits a standalone JavaScript file. Platform bridge functions (DOM operations, fetch, timers) " "and emits a standalone JavaScript file. Platform bridge functions (DOM operations, fetch, timers) "
"are emitted as native JS implementations.") "are emitted as native JS implementations.")
(div :class "bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-stone-200" (div :class "not-prose bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-stone-200"
(pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words" (pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words"
(code (highlight bootstrapper-source "python"))))) (code (highlight bootstrapper-source "python")))))
@@ -361,7 +361,7 @@ deps.sx depends on: eval (optional)")))
(p :class "text-sm text-stone-500" (p :class "text-sm text-stone-500"
"The JavaScript below was generated by running the bootstrapper against the current spec files. " "The JavaScript below was generated by running the bootstrapper against the current spec files. "
"It is a complete, self-contained SX runtime — parser, evaluator, DOM adapter, engine, and CSS system.") "It is a complete, self-contained SX runtime — parser, evaluator, DOM adapter, engine, and CSS system.")
(div :class "bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-violet-300" (div :class "not-prose bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-violet-300"
(pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words" (pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words"
(code (highlight bootstrapped-output "javascript")))))))) (code (highlight bootstrapped-output "javascript"))))))))
@@ -391,7 +391,7 @@ deps.sx depends on: eval (optional)")))
" spec files (eval, primitives, render, adapter-html) " " spec files (eval, primitives, render, adapter-html) "
"and emits a standalone Python module. Platform bridge functions (type constructors, environment ops) " "and emits a standalone Python module. Platform bridge functions (type constructors, environment ops) "
"are emitted as native Python implementations.") "are emitted as native Python implementations.")
(div :class "bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-stone-200" (div :class "not-prose bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-stone-200"
(pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words" (pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words"
(code (highlight bootstrapper-source "python"))))) (code (highlight bootstrapper-source "python")))))
@@ -402,7 +402,7 @@ deps.sx depends on: eval (optional)")))
(p :class "text-sm text-stone-500" (p :class "text-sm text-stone-500"
"The Python below was generated by running the bootstrapper against the current spec files. " "The Python below was generated by running the bootstrapper against the current spec files. "
"It is a complete server-side SX evaluator — eval, primitives, and HTML renderer.") "It is a complete server-side SX evaluator — eval, primitives, and HTML renderer.")
(div :class "bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-violet-300" (div :class "not-prose bg-stone-100 rounded-lg p-5 max-h-96 overflow-y-auto border border-violet-300"
(pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words" (pre :class "text-xs leading-relaxed whitespace-pre-wrap break-words"
(code (highlight bootstrapped-output "python")))))))) (code (highlight bootstrapped-output "python"))))))))

View File

@@ -16,7 +16,7 @@
children)) children))
(defcomp ~doc-code (&key code) (defcomp ~doc-code (&key code)
(div :class "bg-stone-100 rounded-lg p-5 mx-auto max-w-3xl" (div :class "not-prose bg-stone-100 rounded-lg p-5 mx-auto max-w-3xl"
(pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words" (code code)))) (pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words" (code code))))
(defcomp ~doc-note (&key &rest children) (defcomp ~doc-note (&key &rest children)

View File

@@ -12,7 +12,7 @@
(div :class "border border-dashed border-stone-300 rounded p-4 bg-stone-100" children)) (div :class "border border-dashed border-stone-300 rounded p-4 bg-stone-100" children))
(defcomp ~example-source (&key code) (defcomp ~example-source (&key code)
(div :class "bg-stone-100 rounded p-5 mt-3 mx-auto max-w-3xl" (div :class "not-prose bg-stone-100 rounded p-5 mt-3 mx-auto max-w-3xl"
(pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words" (code code)))) (pre :class "text-sm leading-relaxed whitespace-pre-wrap break-words" (code code))))
;; --- Click to load demo --- ;; --- Click to load demo ---