1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 19:39:57 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/howtos/Custom Styles by userClass.tid
Mario Pietsch 19085a1277 Add data attributes to ViewTemplate (#3209)
* change 3 set-widgets to 1 var-widget call. Add data-tags and userClass.

* add new documentation and change the existing one accordingly.
2018-04-24 22:08:20 +01:00

26 lines
725 B
Plaintext

created: 201804111739
modified: 201804111739
title: Custom styles by user-class
tags: [[How to apply custom styles]]
type: text/vnd.tiddlywiki
''Tiddler Field: `class`'' <<.from-version "5.1.16">>
The [[tag manager|$:/TagManager]] allows us to set a tiddler `color` field, that is used to define the "tag-pill" colour. Since: <<.from-version "5.1.16">> we can define a `class` field, that is directly inserted into the [[ViewTemplate|$:/core/ui/ViewTemplate]] and it can be used for styling:
"""
title: `anyName`
tags: `$:/tags/Stylesheet`
class: `myClass`
"""
Every tiddler, that has a `class` field can be styled that way!
```
.myClass {
border: 2px solid blue;
}
```
Learn more at: [[How to apply custom styles]]