cljdoc 2024-07-11

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?

Could you point me to the right place in https://github.com/polyfy/polylith where I should put the css file @lee? 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 @corasaurus-hex advice was spot on, but we just needed to express this through the adoc abstraction.

๐Ÿ’œ 1

I love accidentally being right ๐Ÿ˜…

๐Ÿ’œ 1

I think your advice to use nowrap instead of the various hacks we were inventing was very good! ๐Ÿ’œ

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

Let us know what solution you end up using @tengstrand. 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.

But some nowrap directive would be the most reliable, I think.

> 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

๐Ÿ‘ 2

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