This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-07-11
Channels
- # announcements (18)
- # babashka (6)
- # beginners (54)
- # biff (3)
- # calva (1)
- # cider (2)
- # cljdoc (25)
- # cljfx (17)
- # clojure (29)
- # clojure-brasil (2)
- # clojure-europe (20)
- # clojure-losangeles (3)
- # clojure-nl (2)
- # clojure-norway (8)
- # clojure-portugal (2)
- # clojure-uk (9)
- # clojurescript (18)
- # cursive (6)
- # data-science (10)
- # datalevin (4)
- # datomic (17)
- # emacs (8)
- # gratitude (3)
- # honeysql (4)
- # humbleui (13)
- # hyperfiddle (33)
- # lsp (4)
- # malli (12)
- # missionary (6)
- # music (5)
- # off-topic (9)
- # pedestal (5)
- # polylith (7)
- # releases (4)
- # shadow-cljs (10)
- # xtdb (8)
Is there a way to prevent cljdoc to wrap the #RGB colors under the Dark and Light columns in https://github.com/polyfy/polylith/blob/186e54ec1694af2b332f652048e840ec946492ce/doc/colors.adoc?plain=1#L7-L17 example?
I think the question is probably more can Asciidoc do this? :) There’s a way to specify column width but i’m not sure it’s useful for this situation https://docs.asciidoctor.org/asciidoc/latest/tables/adjust-column-widths/#:~:text=using%20percentage%20values-,Column%20width,total%20width%20of%20the%20table.
Okay, thanks. Or maybe do some CSS tricks with nowrap
or similar (maybe under the hood)? I'm not a CSS expert!
yep, white-space: nowrap
would be the CSS to prevent that wrapping
Found an example https://docs.asciidoctor.org/asciidoctor/latest/html-backend/verbatim-line-wrap/.
Let us know what solution you end up using @U1G0HH87L. Sometimes, instead of using autowidth, I'll https://docs.asciidoctor.org/asciidoc/latest/tables/adjust-column-widths/ and find something that usually works.
Will do that.
> Another hack would be to make your color images a tad wider.
I had that idea too. Or maybe put some nbsp
in the headings.
this is really what white-space: nowrap was made for, so I'd use it if I could in this instance
Could someone help me with adding that custom css file and get it to work? Create a PR, or guide me a bit more? I would be very grateful if so!
cljdoc uses tachyons so you could try using a tachyons class http://tachyons.io
in this case the css class is nowrap
using this syntax maybe https://docs.asciidoctor.org/asciidoc/latest/text/custom-inline-styles/
Could you point me to the right place in https://github.com/polyfy/polylith where I should put the css file @UE21H2HHD? Can I then just refer to that css file, from the .adoc file where it's used (like in https://docs.asciidoctor.org/asciidoctor/latest/html-backend/custom-stylesheet/ example)? I guess it will just extend the existing css.
Or maybe I can just embed css directly to the https://github.com/polyfy/polylith/blob/186e54ec1694af2b332f652048e840ec946492ce/doc/colors.adoc?plain=1#L13-L14, if possible? It would be less elegant, but solve the problem.
like github, we sanitize html for consistent styling, so you can’t just use underlying tachyons styles. if we allowed that we could never switch out tachyons for something else.
I can give you a hand with this sometime today, I vaguely remember editing this doc for you a while back…
Okay, thanks!
So once you know how, it is easy! This:
`#f8eeb6
`
Can be changed to this:
[.nowrap]#`#f8eeb6`#
To force no wrapping. See https://docs.asciidoctor.org/asciidoc/latest/text/text-span-built-in-roles/#built-in. So @U02N27RK69K advice was spot on, but we just needed to express this through the adoc abstraction.I think your advice to use nowrap instead of the various hacks we were inventing was very good! 💜
Now https://cljdoc.org/d/polylith/clj-poly/0.2.20-SNAPSHOT/doc/colors looks great! 💜
