1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-13 17:16:48 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid
Mateusz Wilczek 55124b4ee6
Improve documentation of WikiText formatting (#7272)
* Improve 'Formatting in WikiText.tid'

Add highlight formatting example.
Simplify code formatting example to be single line without nested list.
Improve bold, italic, and underscore formatting examples to be consistent with others.

* Improve 'Styles and Classes in WikiText.tid'

Add more examples, including the default highlight styling when no style or class is defined, as introduced in #6877
2023-02-17 19:14:21 +01:00

41 lines
1.3 KiB
Plaintext

created: 20131205160532119
modified: 20131205160549129
tags: WikiText [[How to apply custom styles]]
title: Styles and Classes in WikiText
type: text/vnd.tiddlywiki
caption: Styles and Classes
Content can be wrapped in `@@`double at signs`@@` to apply specified CSS styles or classes to it. There are multiple ways to use this syntax, as presented below.
Inline content wrapped in `@@`double at signs`@@` without specifying style or class will be assigned the `.tc-inline-style` and displayed as highlighted text. The foreground and background colours of the highlighted text are defined as `highlight-background` and `highlight-foreground` in the current palette.
<<wikitext-example src:"@@some highlighted text@@">>
Style attributes, e.g. `color`, each followed by `;` semicolon can be introduced immediately after the opening `@@`.
<<wikitext-example src:"@@color:steelblue;background-color:lightcyan;some styled text@@">>
Similarly a style can be applied to a multiline content:
<<wikitext-example src:"@@background-color:lightcyan;
* Item one
* Item two
@@
">>
A class may be applied to a multiline content only:
<<wikitext-example src:"@@.tc-double-spaced-list
* Item one
* Item two
@@">>
Multiple classes and styles can be used together:
<<wikitext-example src:"@@.tc-double-spaced-list
@@width:400px;background-color:lightcyan;
* Item one
* Item two
@@
">>