What do "tc" and "tm" means in the tiddlywiki ecosystem ?

83 views
Skip to first unread message

peuhpeuh singe

unread,
Apr 16, 2018, 3:24:02 AM4/16/18
to TiddlyWiki
Like in "tm-navigate" ?

In ".tc-tab-buttons" ?

Thanks for sharing your knowledge !

Jed Carty

unread,
Apr 16, 2018, 3:45:13 AM4/16/18
to TiddlyWiki
They are just prefixed given to the names and don't have any special purpose other than organising the names.

tm- is a prefix on messages used. I am not certain but I always assumed that it means tiddlywiki message. tc- is used to prefix css class names, presumably standing for tiddlywiki class.

PMario

unread,
Apr 16, 2018, 3:50:58 AM4/16/18
to TiddlyWiki
They are shortcuts, because the long version would be way to much to type ;)

On Monday, April 16, 2018 at 9:24:02 AM UTC+2, peuhpeuh singe wrote:
Like in "tm-navigate" ?

tiddlywiki-message-navigate
 
In ".tc-tab-buttons" ?

tiddlywiki-class-tab-buttons

----------------

In TiddlyWiki most "core names" are just naming conventions. ...

The core UI eg: needs to assign some HTML classes to style UI-elements. One of them is a styling "tab-buttons".

In normal cases a developer would use a class name like "tab-buttons" ... BUT ...
Since TW is highly tweakable, and our users are changing almost every aspect of the UI, the "risk" is high that .tab-buttons would be used by a user.
So if "the core" UI would use the same name, it would interfere with a user defined setting. .... That's why tiddlywiki base classes use a prefix: tc-  ... for HTML classes.

Which also means. Users should _NOT define new_  tc-, tm-, tw-, tv- ... tx-  prefixes. Only use them.

As a plugin author I use my own "namespace" for new stuff: Just follow the link.

In the early days TW used tw- as a prefix for many different things. eg: tw-tab-buttons, tw-navigate, ... and so on. ... AS you can see this can get confusing for core devs now, since it mixes "class" and "message" names ...

That's why the naming was changed in 5.0.16-beta.

Hope that clarifies things a bit :)

have fun!
mario

@TiddlyTweeter

unread,
Apr 16, 2018, 5:32:11 AM4/16/18
to TiddlyWiki
GOOD to see these explanations of the CSS naming system in TW.

Makes great sense.

Odd I never twigged it.

Josiah
Reply all
Reply to author
Forward
0 new messages