Docs update

This commit is contained in:
Jeremy Ruston
2013-02-06 11:27:41 +00:00
parent 1d77709372
commit 6896550593
2 changed files with 13 additions and 3 deletions

View File

@@ -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:
```
<p style="color:rgb(255, 0, 0); text-decoration:underline;">This is in red!</p>
<p class="myClass" style="color:rgb(255, 0, 0); text-decoration:underline;">This is in red!</p>
```
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: