From 6896550593f55ffc3ac302c44f42028ac0b64428 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 6 Feb 2013 11:27:41 +0000 Subject: [PATCH] Docs update --- editions/tw5.com/tiddlers/Improvements.tid | 1 - .../tiddlers/wikitextrules/StyleBlockWikiText.tid | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/editions/tw5.com/tiddlers/Improvements.tid b/editions/tw5.com/tiddlers/Improvements.tid index 253b86712..e5a2677c5 100644 --- a/editions/tw5.com/tiddlers/Improvements.tid +++ b/editions/tw5.com/tiddlers/Improvements.tid @@ -10,7 +10,6 @@ For end users, the important improvements include: * Flexible TiddlerFilters that make it easier to work with several tiddlers in a single operation * TiddlyWiki can now be run under [[node.js]] as well as in the browser, allowing it to be used as a personal web server * Tiddlers containing images are now supported just like WikiText tiddlers, including integrated editing of bitmap and SVG images -* Uses standard Twitter Bootstrap CSS (thus enabling the use of Boostrap themes such as http://bootswatch.com) * TiddlyWiki5 can directly build both itself and previous (2.6.x) versions of TiddlyWiki from their constituent separate files, without needing external tools The internal changes mean that TiddlyWiki5 is not compatible with previous versions, using different plugins, themes and so on. The changes to the WikiText have been carefully developed to try to maximise backwards compatibility but content prepared for previous versions of TiddlyWiki will need massaging to work properly in TiddlyWiki5. diff --git a/editions/tw5.com/tiddlers/wikitextrules/StyleBlockWikiText.tid b/editions/tw5.com/tiddlers/wikitextrules/StyleBlockWikiText.tid index 15aac1f5c..17ac2e1ce 100644 --- a/editions/tw5.com/tiddlers/wikitextrules/StyleBlockWikiText.tid +++ b/editions/tw5.com/tiddlers/wikitextrules/StyleBlockWikiText.tid @@ -1,10 +1,11 @@ title: StyleBlockWikiText -This syntax enables you to assign arbitrary styles to generated elements. For example: +This syntax enables you to assign arbitrary styles and classes to generated elements. For example: ``` @@color:#f00; @@text-decoration:underline; +@@.myClass This is in red! @@ ``` @@ -13,13 +14,23 @@ Generates the results: @@color:#f00; @@text-decoration:underline; +@@.myClass This is in red! @@ The HTML looks like this: ``` -

This is in red!

+

This is in red!

+``` + +Note that classes and styles can be mixed subject to the rule that styles must precede classes. For example + +``` +@@.myFirstClass.mySecondClass +@@width:100px;.myThirdClass +This is a paragraph +@@ ``` Note that the style block doesn't generate any HTML elements itself, but instead causes the styles to be applied to all of the elements contained within the style block. This means that you can assign styles to elements generated from WikiText. For example, here is a list with some additional styles applied: