Hi Tony,

Is there a reason you define a width and height and then scale it down?

Scaling like this does not affect the document flow, meaning that while you 
see the scaled down elements on screen in the background the size of each 
of your previews is still considered 600px when it comes to positioning the 
next element.
That is where the gaps come from.

Also as an info: When trying it in my own wiki - which unlike 
tiddlywiki.com uses a fixed story - this happens:

[image: preview.png]

I will test out what tiddlywiki does with flexbox or css grid as a possible 
alternative solution.

Regards,
Felicia



On Monday, 6 July 2020 10:34:48 UTC+2, TW Tones wrote:
>
> Folks,
>
> If you place the following in a tiddler on tiddlywiki.com, you will see 
> it generates a preview of tiddlers with The TableOfContents tag.
>
> To get here I have begged, borrowed and stolen code. 
>
> The problem is I do not know how to remove the empty space between each 
> preview.
>
> Any advice and I would be grateful.
>
> \define preview(filter)
> <style>
> .preview {
>     width:600px; 
>     min-height:400px; max-height:400px;
>     -webkit-transform:scale(.25);
>     -ms-transform:scale(.5);
>     transform:scale(.5,.5);
>     -webkit-transform-origin:0 0; 
>     -ms-transform-origin:0 0; 
>     transform-origin:0 0; 
>     border:1px solid blue;
>     margin:0 0 0 0;
>     padding: 10px 10px 10px 10px;
>     overflow: hidden;
> }
> </style>
>
> <$set name=filter value="$filter$" emptyValue="[[$(currentTiddler)$]]" >
> <div style="    column-count: 4;">
> <$list filter=<<filter>> >
> <$button to=<<currentTiddler>> tooltip={{{ [all[current]addprefix[Open: ]] 
> }}} class="preview" tag="div">
> <$link/>
> <$transclude mode=block/>
> </$button>
> </$list>
> </div>
> </$set>
> \end
>
>
> <<preview "[tag[TableOfContents]]">>
>
>
> Of course when working I would move the styles to a stylesheet and macro 
> to a tiddler tagged macro.
>
> Regards
> TW Tones
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2859574e-0006-41d1-ae96-d44562b04e63o%40googlegroups.com.

Reply via email to