Feedback: Presenting: .table ~ style bullet lists into tables

This thread discusses some “issues” in:

In your sample bullet list you should add spaces after the bullets with normal text and newlines in between “rows” for better readability eg :

*.class - 
** some text col 2
*** more text col 3

* next row
** column 2

The same is true for Usage

**Show Screenshot**

  • There seem to be some magic numbers in the grid calculation
  • 350px and 142px – What are they good for?
    • At the first glance I can not make sense of them, but I’m pretty sure they will cause problems
/* column width */
ul:has(>li.table):has(ul) li {
		grid-template-columns: repeat(8, minmax(calc(calc(100vw - 350px - 142px) / 2), 1fr));
}

There seems to be a problem with the preview.

Good point. Will do.

Exactly! That is really bad. This is because I don’t know how else to get the tiddlers body width. The tidwidth procedure at top inside the stylesheet (and which is edited to produce pretty css output, but this means it is not pretty as code) looks like this (cleaned up):

\define tidwidth()
<% if [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}prefix[fluid-fixed]] %>
calc(100vw - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}} - 142px)
<% else %>
calc({{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}} - 110px)
<% endif %>
\end

…so the idea is 100vw minus river margin and tiddler gutters. Frankly I had a different number furst and had to test around. But it is just bad with the magic numbers. Do you have a method to get tiddler body width? If I remember, I think vanilla stylesheet has hard coded numbers for these things. I wish they were settings!

And it makes the assumption that 100vw represents tiddlers hosted a storyriver within a TiddlyWiki page on a single monitor. The moment you add a second screen (in my case three sometimes four) and stretch your wiki across them, that would look very strange).

In JavaScript:

return document.querySelectorAll(".tc-tiddler-body")[0].offsetWidth;

But that’s a blunt instrument and a little too low-level for everyday needs, as you were attesting to here:

Indeed. Even if readonly.

Haha! Stretching a tiddler over several screens would look strange regardless if you were using this thing of mine or not :wink:

return document.querySelectorAll(".tc-tiddler-body")[0].offsetWidth;

Oh, and would that take into account river margins, tiddler gutters and fluid-fixed vs fixed-fluid ? If yes, I really think it belongs in the core because I’ve had this issue several times in the past.

Of course not. Like I said, it’s low-level. It knows nothing about high-level things like fluid-fixed.

I don’t stretch tiddlers, I stretch my wiki(s). (PM)