aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorWhiteWinterWolf <github@whitewinterwolf.com>2017-09-08 13:45:19 +0200
committerWaylan Limberg <waylan.limberg@icloud.com>2018-07-24 14:42:42 -0400
commit67bb12b3e508b389f18efb6a992cc390680a7235 (patch)
treef9d45a6eee6e9f93d8ebab8bb20991deb05fec16 /docs
parentd7764996e4e08faefaf3564fa71c19751847b55f (diff)
downloadmarkdown-67bb12b3e508b389f18efb6a992cc390680a7235.tar.gz
markdown-67bb12b3e508b389f18efb6a992cc390680a7235.tar.bz2
markdown-67bb12b3e508b389f18efb6a992cc390680a7235.zip
Add the possibility to set additional classes
Additional CSS classes names can be appended to the admonition name using spaces as separators. The following markdown: !!! note floatright This is a floating note. Generates the following HTML code: <div class="admonition note floatright"> <p class="admonition-title">Note</p> <p>This is a floating note.</p> </div>
Diffstat (limited to 'docs')
-rw-r--r--docs/extensions/admonition.md22
1 files changed, 20 insertions, 2 deletions
diff --git a/docs/extensions/admonition.md b/docs/extensions/admonition.md
index 2d2634d..22a6aea 100644
--- a/docs/extensions/admonition.md
+++ b/docs/extensions/admonition.md
@@ -72,8 +72,26 @@ results in:
</div>
```
-rST suggests the following `types`, but you're free to use whatever you want:
- attention, caution, danger, error, hint, important, note, tip, warning.
+You can also provide additional CSS class names separated by spaces. The first
+class should be the "type." For example:
+
+```md
+!!! danger highlight blink "Don't try this at home"
+ ...
+```
+
+will render:
+
+```html
+<div class="admonition danger highlight blink">
+<p class="admonition-title">Don't try this at home</p>
+<p>...</p>
+</div>
+```
+
+rST suggests the following "types": `attention`, `caution`, `danger`, `error`,
+`hint`, `important`, `note`, `tip`, and `warning`; however, you're free to use
+whatever you want.
Styling
-------