Problem replicating macro Tip, Warning and Bad example

21 views
Skip to first unread message

Xabriña

unread,
Jun 17, 2022, 8:57:51 AM6/17/22
to TiddlyWiki
Hello everyone

I am trying to put on my wiki three things that I have seen in the Tiddlywiki v. 5.2.2, but I can't get it right.

Specifically, I want to get the effects of "Tip" "Warning" and "Bad example", for this I have copied the following from the tiddler $:/editions/tw5.com/doc-macros:

\define .tip(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/tip}}</div> $_$</div>

\define .warning(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/warning}}</div> $_$</div>

\define .bad-example(eg)
<table class="doc-bad-example">
<tbody>
<tr class="evenRow">
<td><span class="tc-inline-style" style="font-size:1.5em;">&#9888;</span> Warning:<br> Don't do it this way!</td>
<td>
$eg$
</td>

Then I copied from tiddler$:/editions/tw5.com/doc-styles the following:

.doc-block-icon .tc-image-tip { fill: #56754d8; }

.doc-block-icon .tc-image-warning { fill: #881122; }

.doc-bad-example code, .doc-bad-example pre, table.doc-bad-example {
  background-color:#ffff80;
}

The thing is that I don't get the desired effect, but I'm not sure what I'm doing wrong. I may have to copy something else but I don't know what...

Can someone tell me what I'm missing?

Thanks.

Xabriña

unread,
Jun 17, 2022, 9:01:45 AM6/17/22
to TiddlyWiki
That's how it looks for me...
Aspect.png

Reply all
Reply to author
Forward
0 new messages