1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 10:30:28 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/howtos/Hard_Linebreaks_with_CSS.tid

27 lines
757 B
Plaintext
Raw Normal View History

created: 20170126174506507
modified: 20170126211042714
tags: [[Hard Linebreaks in WikiText]]
title: Hard Linebreaks with CSS
type: text/vnd.tiddlywiki
Since TiddlyWiki Version 5.1.16, it's possible to apply customs styles with `data-` attributes. see: [[How to apply custom styles]]
The [[Custom data-styles]] stylesheet tiddler contains the following definition:
```
[data-tags*="example-hardlinebreaks"] .tc-tiddler-body {
word-break: normal;
word-wrap: break-word;
white-space: pre-wrap;
}
```
If rendered without the tag, the content of "Hard Linebreaks with CSS - Example" will be shown like this:
>{{Hard Linebreaks with CSS - Example}}
----
Open the tiddler to see the custom CSS rules applied: [[Hard Linebreaks with CSS - Example]]