All Markdown documents are also Styledown documents. That is, all of Markdown will work. Styledown implements a few extensions that helps you create styleguides.
Example blocks: Write your CSS documentation with an h3
, and a code block
that begins with @example
.
<!-- markdown.md (Markdown mode) -->
### Button
Create your buttons with a `.button` class.
@example
<a class="button">Button</a>
<a class="button primary">Button</a>
<!-- style.css (Inline mode) -->
/**
* Button:
* Create your buttons with a `.button` class.
*
* @example
* <a class="button">Button</a>
* <a class="button primary">Button</a>
*/
Jade examples: Jade is also supported. It's auto-detected for you when you want Jade or HTML. This allows you to write simpler example code.
<!-- markdown.md (Markdown mode) -->
### Tables
`.table` - tables are styled nicely for you. Just add the class `.table`.
@example
table.table
tr
td Item 1
td Item 2
td Item 3
<!-- style.css (Inline mode) -->
/**
* Tables:
* `.table` - tables are styled nicely for you. Just add the class `.table`.
*
* @example
* table.table
* tr
* td Item 1
* td Item 2
* td Item 3
*/