Is there a way to makes change viewer.css without forking the repo? eg I really want to overwrite:
.max-w-prose { @apply max-w-[46rem] !important; }
.max-w-wide { @apply max-w-5xl !important; }
to utilize the screen width more.
I tried both :nextjournal.clerk/css-class and :nextjournal.clerk/width but it only applies to some viewers and not the whole page, and not the markdown in the comments for instance, so the whole page looks like the attached picture (note how for the table it's great but for eg long results it overflows and cannot be scrolled@yenda1 you can provide your own viewer css like so
(swap! nextjournal.clerk.config/!resource->url assoc "/css/viewer.css" "") but if you’re interested in customizing clerk’s default view, check out how https://github.com/nextjournal/clerk-slideshow/ does it
or actually, I should ask what you’re trying to do first
you want everything full-width?
;; # Controlling Width ↔️
(ns full-width
{:nextjournal.clerk/width :full
:nextjournal.clerk/page-size 50}
(:require [nextjournal.clerk :as clerk]))
;; By default, most results are rendered at `:prose` width.
(range 100)
;; ## Words
(def letter->words
(->> (slurp "/usr/share/dict/words")
clojure.string/split-lines
(group-by (comp keyword clojure.string/upper-case str first))
(into (sorted-map))))
(clerk/table {::clerk/width :full} letter->words)setting {:nextjournal.clerk/width :full} in the ns metadata makes all results full-width
if you want the prose viewer to be full-width and the code-viewer, you can also override those
that’s done like in https://github.com/nextjournal/clerk/blob/main/notebooks/viewers/custom_markdown.clj but you’d want to override the classes on the markdown doc viewer https://github.com/nextjournal/clerk/blob/2cb20f2251e9cbe3311858cc644eef8dc9a6300b/src/nextjournal/clerk/viewer.cljc#L772-L773
you can override viewer.css without forking, I’ll try to send an example probably tomorrow
thanks!