Give 1 link a custom color?

11 views
Skip to first unread message

FLX

unread,
Oct 31, 2008, 3:35:25 PM10/31/08
to TiddlyWiki
Hi,

How do I give one of the links (wiki articles) a custom color?
I tried the code below, but it doesnt work:

@@bgcolor(#ff0000):color(#ffffff): [[SpecialIndex]]@@

I'd like to have the tiddler SpecialIndex to have a different color.

How do I do this?

Thanks,

Dennis
The Netherlands

Eric Shulman

unread,
Oct 31, 2008, 8:09:11 PM10/31/08
to TiddlyWiki
> How do I give one of the links (wiki articles) a custom color?
> I tried the code below, but it doesnt work:
> @@bgcolor(#ff0000):color(#ffffff): [[SpecialIndex]]@@
> I'd like to have the tiddler SpecialIndex to have a different color.

create a custom CSS class definition in your [[StyleSheet]], like
this:
.specialLink a { background-color:#f00; color:#fff; }
then in your tiddler content, write:
{{specialLink{[[SpecialIndex]]}}}

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

FLX

unread,
Nov 3, 2008, 11:58:38 AM11/3/08
to TiddlyWiki
Hi Eric,

Sorry, but this doesn't seem to work :(

Regards,

Dennis

Eric Shulman

unread,
Nov 3, 2008, 1:24:20 PM11/3/08
to TiddlyWiki
> Sorry, but this doesn't seem to work :(

Hmm..... it seems that the CSS rule has to be a bit more specific.
Try this:

.specialLink a, .specialLink
tiddlyLinkExisting, .specialLink .tiddlyLinkNonExisting
{ background-color:#f00; color:#fff; }


-e

FLX

unread,
Nov 4, 2008, 2:00:11 PM11/4/08
to TiddlyWiki
Hi Eric,

It seems we're getting in the right direction. The tiddlers that link
to nowhere are currently working with the correct colors. However the
ones who link to a actual document don't set the correct color.

Any idea at what this is causing it?

Regards,

Dennis

Eric Shulman

unread,
Nov 4, 2008, 2:02:19 PM11/4/08
to TiddlyWiki
> It seems we're getting in the right direction. The tiddlers that link
> to nowhere are currently working with the correct colors. However the
> ones who link to a actual document don't set the correct color.
> Any idea at what this is causing it?

yeah. a typo. There needs to be a "." preceding the
"tiddlyLinkExisting" classname, as in:

.specialLink .tiddlyLinkExisting ... { ... }

-e

FLX

unread,
Nov 6, 2008, 10:04:34 PM11/6/08
to TiddlyWiki
Thanks Eric, works like a charm!

Regards,

Dennis
Reply all
Reply to author
Forward
0 new messages