H'lo, TiddlyWizards —
I've been playing around with the opacity of tiddlers. Specifically the opacity of .tc-tiddler-frame, which I can style with CSS to get the translucent effect I want.
For example, here's a simple stylesheet tiddler:
.tc-story-river .tc-tiddler-view-frame,
.tc-story-river .td-tiddler-edit-frame {
opacity:0.9;
}
And here's the HTML from the DIV of a successfully styled tiddler that loads as one of the TW's default tiddlers:
<div data-tiddler-title="$:/palettes/Terminix" data-tags="$:/tags/Palette" class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-system tc-tagged-%24%3A%2Ftags%2FPalette "><div class="tc-tiddler-title">
However —
When I switch to edit view, check out how the DIV is built:
<div class="tc-tiddler-frame tc-tiddler-edit-frame " data-tiddler-title="Draft of '$:/palettes/Terminix' by Scott" style="transition: none 0s ease 0s; opacity: 1;">
That style attribute is now overriding anything from my CSS, resetting the opacity of the tiddler back to 100% (opacity: 1;).
And it lingers when the tiddler is saved, affecting the DIV (and appearance) of the saved tiddler when viewed through the standard ViewTemplate:
<div data-tiddler-title="$:/palettes/Terminix" data-tags="$:/tags/Palette" class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-system tc-tagged-%24%3A%2Ftags%2FPalette " style="transition: none 0s ease 0s; opacity: 1;"><div class="tc-tiddler-title">
My translucency is gone. 😢
From what I can tell, the style="transition: none 0s ease 0s; opacity: 1;" bit is applied to any tiddler built during the TiddlyWiki session but not to tiddlers loaded at the TiddlyWiki's startup.
Is this a bug? Or is the behavior by design?
Are there any good experiments with opacity changes I should be looking at? (I seem to remember someone using the palette to make certain elements translucent, which is a bit different than affecting entire tiddlers, including the tc-tiddler-frame and all its children.)
---------------------------------------------------
In case you're curious what I'm up to, I'd like to make shadow tiddlers translucent for easy identification when I'm TiddlyWiking.