[TW5] Transparent background for one tiddler

228 views
Skip to first unread message

FrD

unread,
Jun 24, 2016, 11:01:22 AM6/24/16
to TiddlyWiki
Hi,

I'd like to have a transparent background for one precise tiddler : MyTiddler.
I've tried to put this in a stylesheet :

div[title=MyTiddler]{
        background-color: transparent;
}

but no way, the background remains the same.

What am I missing ?


Thansk for your help

FrD

Ton Gerner

unread,
Jun 24, 2016, 11:27:15 AM6/24/16
to TiddlyWiki
Hi FrD,

See http://tiddlywiki.com/#How%20to%20apply%20custom%20styles%20by%20tag

Tag MyTiddler with xxx

and create a stylesheet tiddler with:

.tc-tagged-xxx {
    background
-color:transparent;
}

Cheers,

Ton

Matthew Lauber

unread,
Jun 24, 2016, 11:28:00 AM6/24/16
to TiddlyWiki
Tiddlers (in tw5, which I'm assuming you're using) do not have the title property set.  Not sure of the correct solution, but that's the cause of the problem.  

One possible solution is to change the $:/core/ui/PageTemplate/story to special case the tiddler with the given title and wrap it in a 

@@background-color: transparent;
....{{transclude}}...
@@

FrD

unread,
Jun 24, 2016, 11:36:44 AM6/24/16
to TiddlyWiki
Hi Ton,

Thanks for your quick answer.
I was aware of this solution, but it seemed a bit overkill since only one tiddler is concerned.

Maybe as a last resort I'll use that.

FrD

FrD

unread,
Jun 24, 2016, 11:48:09 AM6/24/16
to TiddlyWiki
Hi Matthew,

The tiddler with the transparent background will be used for a kind of lightbox (with the "tm-modal" message). So I'm not sure it's not outside the story.

Thanks anyway.

FrD

Evolena

unread,
Jun 24, 2016, 6:50:17 PM6/24/16
to tiddl...@googlegroups.com
Then you can look at the tc-modal classes in the vanilla stylesheet.
.tc-modal, .tc-modal-footer {
    background
-color: transparent;
}
can be a first step to achieve what you want.

However, I don't know how to assign another class to modals.


So I'm not sure it's not outside the story.
It is indeed: links inside a modal are not catched by the navigator widget, for instance.

FrD

unread,
Jun 25, 2016, 2:27:55 AM6/25/16
to TiddlyWiki
Hi,

You're right. I was dealing with the problem the wrong way.
I'll use css on tc-modal and the like.

I'm trying some ideas on a lightbox like system. I'll post here about my progress.

Thanks

FrD
Reply all
Reply to author
Forward
0 new messages