Right now I’m trying to focus on consistent and reliable methods for controlling the right text formatting expression. I think it’s procedures and then the right knowledge of different quotations marks. I feel like I need help on a big level.
\define colorbox(clr)
<div style="background-color: darkblue; padding:10px;">
<div style="background-color: $clr$;">
hello world anyways
</div>
</div>
\end
<$let
missing={{{ [[$:/palette]is[missing]then[#ffffff]else[not missing]] }}}
pal={{{ [{$:/palette}get[text]stringify[]split[\n]prefix[tiddler-background:]removeprefix[tiddler-background:]] }}}
adaptive={{{ [[$:/palette]is[missing]then[gone]else<pal>] }}}
manual="#ffffff"
manual2={{{ [<colour background>] }}}
variabal=<<colour background>>
>
<$macrocall $name="colorbox" clr=<<missing>> /> <br>
<$macrocall $name="colorbox" clr=<<pal>> /> <br>
<$macrocall $name="colorbox" clr=<<adaptive>> /> <br>
<$macrocall $name="colorbox" clr=<<manual>> /> <br>
<$macrocall $name="colorbox" clr=<<manual2>> /> <br>
<$macrocall $name="colorbox" clr=<<variabal>> /> <br>
<$macrocall $name="colorbox" clr=<<colour background>> />
missing palette: <<missing>><br>
palette: <<pal>><br>
adaptive: <<adaptive>><br>
adaptive: #ffffff<br>
manual: <<manual>><br>
manual2: <<manual2>>
</$let>
Some of these macros work in my wiki, but they don’t work in the default, fresh TiddlyWIki. No clue why.
I keep on getting literal strings when I don’t want them, like <<colour background>>
instead of the value.
In the case of the “else” and “then” operators, I realize they’re about literal strings, but even when I get the right string, it won’t impact the CSS.
I have looked briefly at procedures for expression of filters in text mode, as well as the text widget, but I just don’t seem to have control over what I want yet.
I guess I’m at a place where it’s time for me to go back and unlearn and relearn some things.