> Thank you Simon, > that is something i have been looking for for some time. > > Can I do: > > > [data-tiddler-type="text/vnd.tiddlywiki;flexibility=replace"].tc-tiddler-frame > { > border-radius: 50%; > } > > Hi Jan, I believe it was TiddlyWiki v5.1.16 or v5.1.17 that introduced the data attributes "data-tiddler-title" and "data-tags". That doesn't mean that data attributes within tiddlywiki are limited to those two, they are just the only two data attributes already applied to tiddlers. So it's convenient to re-use them, instead of adding your own
You can add any data attribute to any html tag you want: <div data-hello-bla={{!!type}}/> creates a div with the data attribute data-hello-bla and its value is the type of the tiddler... > Or do I have to do > > \define assign-css() > [data-tiddler-title="$(currentTiddler)$"].tc-tiddler-frame { > border-radius: 50%; > } > \end > <$list filter="[all[tiddlers]type[text/vnd.tiddlywiki;flexibility=replace]]"> > <<assign-css>> > </$list> > > As direct CSS-Trick for Types would be great. > This is the way I use it, because the data-tiddler-title is already applied to every tiddler (look at $:/core/ui/ViewTemplate) and this allows flexibility Note that I always put a rules pragma on top of assign-css (I've updated the plugin readme): \define assign-css() \rules only [data-tiddler-title="$(currentTiddler)$"].tc-tiddler-frame { border-radius: 50%; } \end <$list filter="[all[tiddlers]type[text/vnd.tiddlywiki;flexibility=replace]]"> <<assign-css>> </$list> This \rules only pragma causes the tiddlywiki parser to skip the assign-css macro, so that wikitext within the title doesn't get rendered and the resulting css selector gets created correctly -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/eca64f6d-cab3-4e32-be9e-64b47e133291%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.