Floating the prefix left seems to do the trick, it even wraps the block 
text around the float which is visually appealing for these purposes.

I run up against a lot of CSS/HTML issues because of my wiki structure. I 
imagine being able to apply a class to a transclusion would be helpful for 
some of these problems, as previous forays with classes have caused  me 
headaches.

Thanks!

-Reece

On Sunday, March 8, 2020 at 2:12:24 PM UTC-4, Jeremy Ruston wrote:
>
> Hi Mat
>
> This, and Reeces other similar "block issues" caused from transclusion 
> blockmode, are interesting. Maybe the transclusionwidget should have a 
> class attribute?
>
>
> The transclude widget doesn’t generate any DOM elements itself, and so 
> there would be nowhere to attach the class.
>
>  

> But this is more of an HTML issue, I think: there’s no facility for 
> injecting content into a block other than float, as far as I know.
>
> Best wishes
>
> Jeremy.
>
>
>
> Reece, here's an alternative solution that might work IF you prefix is a 
> string that fulfills common css definition name rules.
>
> \define pff-display-xblock(field:"" class:"")
> <$list filter='[is[current]has[$field$]]'>
> <div class="myclass $class$">
> <$transclude field="$field$" mode="block" /></div>
> </$list>
> \end
>
> <<pff-display-xblock "caption" "xxx">>
>
> <style>
> .myclass { margin-left:2em;}
> .xxx::before {content:"xxx"; position:absolute; margin-left:-2em}
> </style>
>
> The prefix you use in the macrocall (i.e "xxx") has a corresponding 
> styledefinition (i.e ".xxx").
>
> <:-)
>
> -- 
> 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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/173911ac-375d-46a3-adad-9e69f39d1eb3%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/173911ac-375d-46a3-adad-9e69f39d1eb3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/749f0bb3-0c10-4a4a-b555-9c89534a4432%40googlegroups.com.

Reply via email to