diff options
author | WhiteWinterWolf <github@whitewinterwolf.com> | 2017-09-08 13:45:19 +0200 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2018-07-24 14:42:42 -0400 |
commit | 67bb12b3e508b389f18efb6a992cc390680a7235 (patch) | |
tree | f9d45a6eee6e9f93d8ebab8bb20991deb05fec16 /docs/extensions | |
parent | d7764996e4e08faefaf3564fa71c19751847b55f (diff) | |
download | markdown-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/extensions')
-rw-r--r-- | docs/extensions/admonition.md | 22 |
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 ------- |