apply style to transclude

61 views
Skip to first unread message

Dave

unread,
Oct 7, 2018, 10:23:49 PM10/7/18
to TiddlyWiki
Hi,

I have this in a table
<$set name="desc" filter="[<currentTiddler>addsuffix[.d]]">
<td>

<$transclude tiddler=<
<desc>>/>

</td></$set>

which displays the content of some tiddlers in a table (I omitted the rest of the table code),

and I also have this in a stylesheet
[data-tags*="descr"] .tc-tiddler-body  {
  font
-size:.6em;
}

so the tiddlers from the table above that happen to be tagged with "descr" have a body font size that's smaller than the default size.

However, when rendered in the table, the text comes out as default font size.  Its actually in that table that I wanted it smaller. 


Is there a way to directly force the font-size:.6em right in the <$transclude/> widget?


Thanks,
- Dave



Mohammad

unread,
Oct 7, 2018, 11:19:00 PM10/7/18
to tiddl...@googlegroups.com
Dave, 
There are several routes to do this, but the simplest is to add a style attribute in a span tag before transclude widget like

<span style="font-size:0.6em;" ><$transclude tiddler=<<desc>>/></span>

Dave

unread,
Oct 8, 2018, 10:49:23 AM10/8/18
to TiddlyWiki
Awesome, thank you!!

That was actually pretty straight forward. :)
Reply all
Reply to author
Forward
0 new messages