Distinguishing Native Shadow Tiddlers from Overwritten Shadow Tiddlers (for Styling)

67 views
Skip to first unread message

Scott Simmons (Secret-HQ)

unread,
Mar 8, 2020, 4:17:55 PM3/8/20
to TiddlyWiki
This is a follow-up to another question about using CSS to affect the opacity of tiddlers from a year ago.

In that thread, I managed to make shadow tiddlers translucent for easy identification when TiddlyWiking.  My follow-up ambition was to add similarly identifying styling to former shadow tiddlers (i.e., modified shadow tiddlers, now saved as full-fledged tiddlers).

However, it doesn't look like there's an obvious way to identify those for CSS.  I used to think they got the style "tc-tiddler-exists" added when they were saved, and it seems that IS true — the original shadow also has that same CSS class.  Best I can tell, the only difference between a "native shadow" (one that hasn't been modified since it was loaded) and an overwritten shadow is the addition of the "tc-tiddler-exists" class a second time:

NATIVE SHADOW:
tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-shadow tc-tiddler-system 

OVERWRITTEN SHADOW:
tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-exists tc-tiddler-shadow tc-tiddler-system 

... and I don't think styling .tc-tiddler-exists.tc-tiddler-exists.tc-tiddler-shadow differently from .tc-tiddler-exists.tc-tiddler-shadow is going to work.

Are there any ways to go about this with how TW identifies shadow tiddlers and overwritten shadow tiddlers?  Because the EditTemplate throws up different alerts when you're editing a native shadow and when you're editing an overwritten shadow, I assume there must be some TiddlyWay of knowing the difference.  Is it a way that can be leveraged by CSS?

Ton Gerner

unread,
Mar 9, 2020, 7:46:31 AM3/9/20
to TiddlyWiki
Hi Scott,

NATIVE SHADOW:
tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-shadow tc-tiddler-system 

OVERWRITTEN SHADOW:
tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-exists tc-tiddler-shadow tc-tiddler-system 

... and I don't think styling .tc-tiddler-exists.tc-tiddler-exists.tc-tiddler-shadow differently from .tc-tiddler-exists.tc-tiddler-shadow is going to work.

Are there any ways to go about this with how TW identifies shadow tiddlers and overwritten shadow tiddlers?  Because the EditTemplate throws up different alerts when you're editing a native shadow and when you're editing an overwritten shadow, I assume there must be some TiddlyWay of knowing the difference.  Is it a way that can be leveraged by CSS?

I do use someting like:

/* SHADOW TIDDLER LINK */
a
.tc-tiddlylink-shadow {
     font
-weight: bold;
     color
: Blue;
}

/* OVERRIDDEN SHADOW TIDDLER LINK */
a
.tc-tiddlylink-shadow.tc-tiddlylink-resolves {
     font
-weight: bold;
     color
: Red;
}

Cheers,

Ton

Mat

unread,
Mar 9, 2020, 1:03:33 PM3/9/20
to TiddlyWiki
@Ton, I think Scott is hoping for styling the actual tiddlers not just the link.

@Scott, I think you can use this

tags:$:/tags/Stylesheet
type
: text/vnd.tiddlywiki
text
:
<$list filter="[is[shadow]]">
[data-tiddler-title="<<currentTiddler>>"] { yourstyles }
</
$list>


<:-)

Jeremy Ruston

unread,
Mar 9, 2020, 4:34:01 PM3/9/20
to tiddl...@googlegroups.com
Hi Scott

It’s an oversight that there wasn’t a way to style overridden shadow tiddlers. I’ve added a tc-tiddler-overridden-shadow for the upcoming v5.1.22 release:


It’ll take about 10 minutes to build and then you’ll be able to try it out at https://tiddlywiki.com/prerelease

Best wishes

Jeremy.


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c3a1f84f-8247-44bb-9538-01491d0c4f7f%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages