1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-14 05:44:50 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid

41 lines
1.3 KiB
Plaintext
Raw Normal View History

created: 20131205160532119
modified: 20131205160549129
tags: WikiText [[How to apply custom styles]]
title: Styles and Classes in WikiText
type: text/vnd.tiddlywiki
2014-09-11 08:15:58 +00:00
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
@@
">>