A-ha! It occurred to me that the core must be doing this somehow with
background images, so I went looking and found TiddlyWiki's
native <<datauri>> macro.
This is how to do what I was trying to do:
.tc-story-river .tc-tiddler-view-frame {
background:url('<<datauri "$:/backgrounds/92%white.png">>') !important;
}
Some days it seems there's nothing Jeremy and the TiddlyWiki community
*haven't* thought of.
*edited and reposted to remove typo*
On Monday, April 26, 2021 at 9:36:29 AM UTC-4 Scott Simmons (Secret-HQ)
wrote:
> Hi, all —
>
> In my ongoing quest for translucent tiddlers, I've started using images of
> varying color and opacity as the background for my tiddlers.
>
> However, it occurs to me that, instead of pointing to these images
> elsewhere, I could embed them in my TWs and reference them without having
> another resource to keep track of.
>
> My current stylesheets look something like this:
>
> .tc-story-river .tc-tiddler-view-frame {
> background:url('images/backgrounds/92-percent-opacity-white.png')
> !important;
> }
>
> But if I move that PNG into a tiddler ($:/backgrounds/92%white.png), can
> I transclude it into my stylesheet?
>
> I'm including transcludeinline among my stylesheet tiddler's pragma:
>
> \rules only filteredtranscludeinline transcludeinline macrodef
> macrocallinline html
>
> but I'm not pulling in the content (the image) from the tiddler.
>
--
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/eaeb0cee-c0bc-4311-bae8-992177dfc615n%40googlegroups.com.