markdown-it-admon-collapsible 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # 1.9.1 (2025-12-26)
2
+
3
+ - forked from markdown-it-admon
package/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin.
2
+ Copyright (c) 2018 jebbs
3
+ Copyright (c) 2021- commenthol
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the "Software"), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # markdown-it-admon-collapsible
2
+
3
+ > **Note:** This package is a fork of [markdown-it-admon](https://github.com/commenthol/markdown-it-admon) with added support for collapsible blocks (???), inspired by Material for MkDocs.
4
+
5
+ > Plugin for creating admonitions for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
6
+
7
+ With this plugin you can have collapsible admonitions:
8
+
9
+ - Admonition blocks: Use !!! to create styled info/warning/note blocks
10
+ - Collapsible blocks: Use ??? to create blocks with a toggle, collapsed or expanded
11
+ - ???+ starts the block expanded
12
+ - All admonition and collapsible types from Material for MkDocs are supported
13
+ - Toggle button and styles included
14
+
15
+ Examples:
16
+
17
+ ```markdown
18
+ !!! note
19
+ This is an admonition
20
+
21
+ ??? warning "Collapsible Warning"
22
+ This block can be expanded/collapsed
23
+
24
+ ???+ info "Expanded Info"
25
+ This block starts expanded
26
+ ```
27
+
28
+ Markdown syntax is inspired by [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) and supports both admonition blocks (!!!) and collapsible blocks (???).
29
+
30
+ [rST][] suggests the following "types": `attention`, `caution`, `danger`, `error`, `hint`, `important`, `note`, `tip`, and `warning`; however, you’re free to use whatever you want.
31
+
32
+ A styles file does support the following admonition types: Credits go to [vscode-markdown-extended][].
33
+
34
+ ```
35
+ 'note',
36
+ 'summary', 'abstract', 'tldr',
37
+ 'info', 'todo',
38
+ 'tip', 'hint',
39
+ 'success', 'check', 'done',
40
+ 'question', 'help', 'faq',
41
+ 'warning', 'attention', 'caution',
42
+ 'failure', 'fail', 'missing',
43
+ 'danger', 'error', 'bug',
44
+ 'example', 'snippet',
45
+ 'quote', 'cite'
46
+ ```
47
+
48
+ ![](./docs/admonition-types.png)
49
+
50
+ ## Installation
51
+
52
+ node.js:
53
+
54
+ ```bash
55
+ $ npm install markdown-it-admon-collapsible --save
56
+ ```
57
+
58
+
59
+ ## API
60
+
61
+ ```js
62
+ const md = require('markdown-it')()
63
+ .use(require('markdown-it-admon-collapsible') [, options]);
64
+ ```
65
+
66
+ Params:
67
+
68
+ - __name__ - container name (mandatory)
69
+ - __options?:__
70
+ - __render__ - optional, renderer function for opening/closing tokens.
71
+
72
+ ## License
73
+
74
+ [MIT](./LICENSE)
75
+
76
+ ## References
77
+
78
+ * [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/)
79
+ * [vscode-markdown-extended][vscode-markdown-extended]
80
+ * [rST]: https://docutils.sourceforge.io/docs/ref/rst/directives.html#specific-admonitions
81
+ * [vscode-markdown-extended]: https://github.com/qjebbs/vscode-markdown-extended
Binary file
package/index.js ADDED
@@ -0,0 +1,232 @@
1
+ /*
2
+ const ADMONITION_TAGS = [
3
+ 'note',
4
+ 'summary', 'abstract', 'tldr',
5
+ 'info', 'todo',
6
+ 'tip', 'hint',
7
+ 'success', 'check', 'done',
8
+ 'question', 'help', 'faq',
9
+ 'warning', 'attention', 'caution',
10
+ 'failure', 'fail', 'missing',
11
+ 'danger', 'error', 'bug',
12
+ 'example', 'snippet',
13
+ 'quote', 'cite'
14
+ ]
15
+ */
16
+
17
+ const capitalize = ([first, ...rest], lowerRest = false) =>
18
+ first.toUpperCase() + rest.join('')
19
+
20
+ function getTag (params) {
21
+ const [tag = '', ..._title] = params.trim().split(' ')
22
+
23
+ /* c8 ignore next 3 */
24
+ if (!tag) {
25
+ return {}
26
+ }
27
+
28
+ const joined = _title.join(' ');
29
+ let title;
30
+ if (!joined) {
31
+ title = capitalize(tag);
32
+ } else if (joined === '""') {
33
+ title = '';
34
+ } else if ((joined.startsWith('"') && joined.endsWith('"')) || (joined.startsWith("'") && joined.endsWith("'"))) {
35
+ title = joined.slice(1, -1);
36
+ } else {
37
+ title = joined;
38
+ }
39
+ return { tag: tag.toLowerCase(), title };
40
+ }
41
+
42
+ function validate (params) {
43
+ const [tag = ''] = params.trim().split(' ', 1)
44
+ return !!tag
45
+ }
46
+
47
+
48
+ function renderDefault(tokens, idx, _options, env, slf) {
49
+ return slf.renderToken(tokens, idx, _options, env, slf);
50
+ }
51
+
52
+ function renderCollapsibleOpen(tokens, idx) {
53
+ const token = tokens[idx];
54
+ const classes = token.attrs ? token.attrs.find(a => a[0] === 'class')[1] : '';
55
+ return `<div class="${classes}">\n`;
56
+ }
57
+
58
+ function renderCollapsibleTitleOpen(tokens, idx) {
59
+ const expanded = tokens[idx - 1]?.meta?.expanded;
60
+ // Add toggle button
61
+ return `<p class="admonition-title"><button class="collapsible-toggle" tabindex="0">${expanded ? '&#x2212;' : '&#x2b;'}</button>`;
62
+ }
63
+
64
+ function renderCollapsibleTitleClose() {
65
+ return '</p>\n';
66
+ }
67
+
68
+ function renderCollapsibleContentOpen(tokens, idx) {
69
+ return '<div class="collapsible-content">\n';
70
+ }
71
+
72
+ function renderCollapsibleContentClose() {
73
+ return '</div>\n';
74
+ }
75
+
76
+
77
+ const minMarkers = 3;
78
+ const markerTypes = [
79
+ { str: '!', type: 'admonition' },
80
+ { str: '?', type: 'collapsible' }
81
+ ];
82
+
83
+
84
+ function admonition(state, startLine, endLine, silent) {
85
+ let pos, nextLine, token;
86
+ const start = state.bMarks[startLine] + state.tShift[startLine];
87
+ let max = state.eMarks[startLine];
88
+
89
+ // Determine marker type
90
+ let markerType = null;
91
+ for (const type of markerTypes) {
92
+ if (state.src.substr(start, type.str.length) === type.str.repeat(type.str.length)) {
93
+ markerType = type;
94
+ break;
95
+ }
96
+ }
97
+ if (!markerType) return false;
98
+
99
+ const markerStr = markerType.str;
100
+ const markerLen = markerStr.length;
101
+
102
+ // Check out the rest of the marker string
103
+ for (pos = start + 1; pos <= max; pos++) {
104
+ if (markerStr[(pos - start) % markerLen] !== state.src[pos]) {
105
+ break;
106
+ }
107
+ }
108
+
109
+ const markerCount = Math.floor((pos - start) / markerLen);
110
+ if (markerCount < minMarkers) return false;
111
+ const markerPos = pos - ((pos - start) % markerLen);
112
+ let params = state.src.slice(markerPos, max);
113
+ let markup = state.src.slice(start, markerPos);
114
+
115
+ // Collapsible: check for plus sign
116
+ let isCollapsible = markerType.type === 'collapsible';
117
+ let expanded = false;
118
+ if (isCollapsible && params.trim().startsWith('+')) {
119
+ expanded = true;
120
+ params = params.trim().slice(1).trim();
121
+ markup += '+';
122
+ }
123
+
124
+ if (!validate(params)) return false;
125
+ if (silent) return true;
126
+
127
+ const oldParent = state.parentType;
128
+ const oldLineMax = state.lineMax;
129
+ const oldIndent = state.blkIndent;
130
+
131
+ let blkStart = pos;
132
+ for (; blkStart < max; blkStart += 1) {
133
+ if (state.src[blkStart] !== ' ') break;
134
+ }
135
+ state.parentType = 'admonition';
136
+ state.blkIndent += blkStart - start;
137
+
138
+ let wasEmpty = false;
139
+ nextLine = startLine;
140
+ for (;;) {
141
+ nextLine++;
142
+ if (nextLine >= endLine) break;
143
+ pos = state.bMarks[nextLine] + state.tShift[nextLine];
144
+ max = state.eMarks[nextLine];
145
+ const isEmpty = state.sCount[nextLine] < state.blkIndent;
146
+ if (isEmpty && wasEmpty) break;
147
+ wasEmpty = isEmpty;
148
+ if (pos < max && state.sCount[nextLine] < state.blkIndent) break;
149
+ }
150
+ state.lineMax = nextLine;
151
+
152
+ const { tag, title } = getTag(params);
153
+
154
+ // Use different token for collapsible
155
+ const openType = isCollapsible ? 'collapsible_open' : 'admonition_open';
156
+ const closeType = isCollapsible ? 'collapsible_close' : 'admonition_close';
157
+
158
+ token = state.push(openType, 'div', 1);
159
+ token.markup = markup;
160
+ token.block = true;
161
+ token.attrs = [['class', `admonition ${tag}${isCollapsible ? ' collapsible' : ''}${expanded ? ' expanded' : ''}`]];
162
+ token.meta = { tag, expanded };
163
+ token.content = title;
164
+ token.info = params;
165
+ token.map = [startLine, nextLine];
166
+
167
+ if (title) {
168
+ const titleMarkup = markup + ' ' + tag;
169
+ token = state.push(isCollapsible ? 'collapsible_title_open' : 'admonition_title_open', 'p', 1);
170
+ token.markup = titleMarkup;
171
+ token.attrs = [['class', 'admonition-title']];
172
+ token.map = [startLine, startLine + 1];
173
+
174
+ token = state.push('inline', '', 0);
175
+ token.content = title;
176
+ token.map = [startLine, startLine + 1];
177
+ token.children = [];
178
+
179
+ token = state.push(isCollapsible ? 'collapsible_title_close' : 'admonition_title_close', 'p', -1);
180
+ token.markup = titleMarkup;
181
+ }
182
+
183
+ state.md.block.tokenize(state, startLine + 1, nextLine);
184
+
185
+ token = state.push(closeType, 'div', -1);
186
+ token.markup = state.src.slice(start, pos);
187
+ token.block = true;
188
+
189
+ state.parentType = oldParent;
190
+ state.lineMax = oldLineMax;
191
+ state.blkIndent = oldIndent;
192
+ state.line = nextLine;
193
+
194
+ return true;
195
+ }
196
+
197
+ module.exports = function admonitionPlugin(md, options = {}) {
198
+ const render = options.render || renderDefault;
199
+
200
+ md.renderer.rules.admonition_open = render;
201
+ md.renderer.rules.admonition_close = render;
202
+ md.renderer.rules.admonition_title_open = render;
203
+ md.renderer.rules.admonition_title_close = render;
204
+
205
+ // Collapsible rendering
206
+ md.renderer.rules.collapsible_open = renderCollapsibleOpen;
207
+ md.renderer.rules.collapsible_close = (tokens, idx) => '</div>';
208
+ md.renderer.rules.collapsible_close = (tokens, idx) => '</div>\n';
209
+ md.renderer.rules.collapsible_title_open = renderCollapsibleTitleOpen;
210
+ md.renderer.rules.collapsible_title_close = renderCollapsibleTitleClose;
211
+
212
+ // Wrap content in collapsible-content div
213
+ const origBlockTokenize = md.block.tokenize;
214
+ md.block.tokenize = function(state, startLine, endLine) {
215
+ if (state.parentType === 'admonition' && state.tokens.length > 0) {
216
+ const lastToken = state.tokens[state.tokens.length - 1];
217
+ if (lastToken.type === 'collapsible_title_close') {
218
+ state.tokens.push({ type: 'collapsible_content_open' });
219
+ origBlockTokenize.call(this, state, startLine, endLine);
220
+ state.tokens.push({ type: 'collapsible_content_close' });
221
+ return;
222
+ }
223
+ }
224
+ origBlockTokenize.call(this, state, startLine, endLine);
225
+ };
226
+ md.renderer.rules.collapsible_content_open = renderCollapsibleContentOpen;
227
+ md.renderer.rules.collapsible_content_close = renderCollapsibleContentClose;
228
+
229
+ md.block.ruler.before('fence', 'admonition', admonition, {
230
+ alt: ['paragraph', 'reference', 'blockquote', 'list']
231
+ });
232
+ }
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "markdown-it-admon-collapsible",
3
+ "version": "1.9.1",
4
+ "description": "Plugin to create admonitions for markdown-it markdown parser",
5
+ "keywords": [
6
+ "admonition",
7
+ "markdown-it-plugin",
8
+ "markdown-it",
9
+ "markdown"
10
+ ],
11
+ "homepage": "https://github.com/tomasdahlqvist/markdown-it-admon-collapsible#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/tomasdahlqvist/markdown-it-admon-collapsible/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/tomasdahlqvist/markdown-it-admon-collapsible.git"
18
+ },
19
+ "license": "MIT",
20
+ "author": "",
21
+ "maintainers": [
22
+ "tomasdahlqvist"
23
+ ],
24
+ "main": "index.js",
25
+ "directories": {
26
+ "doc": "docs",
27
+ "example": "example",
28
+ "test": "test"
29
+ },
30
+ "files": [
31
+ "CHANGELOG.md",
32
+ "docs/",
33
+ "dist/",
34
+ "index.js",
35
+ "styles/"
36
+ ],
37
+ "scripts": {
38
+ "clean": "git clean -fXd -e \\!node_modules -e \\!node_modules/**/*",
39
+ "coverage": "npm run test && c8 report --reporter html",
40
+ "lint": "eslint --fix .",
41
+ "test": "c8 mocha",
42
+ "build": "mkdir -p dist && node_modules/.bin/browserify ./ -s markdownitAdmonCollapsible > dist/markdown-it-admon-collapsible.js && terser dist/markdown-it-admon-collapsible.js -c -m > dist/markdown-it-admon-collapsible.min.js"
43
+ },
44
+ "devDependencies": {
45
+ "browserify": "^17.0.0",
46
+ "c8": "^10.1.3",
47
+ "eslint": "^8.56.0",
48
+ "eslint-config-standard": "^17.1.0",
49
+ "eslint-plugin-import": "^2.29.1",
50
+ "eslint-plugin-node": "^11.1.0",
51
+ "eslint-plugin-promise": "^6.1.1",
52
+ "markdown-it": "^14.0.0",
53
+ "markdown-it-testgen": "~0.1.6",
54
+ "mocha": "^11.7.5",
55
+ "rimraf": "^6.1.2",
56
+ "terser": "^5.26.0"
57
+ }
58
+ }
@@ -0,0 +1,265 @@
1
+ /* Collapsible block styles */
2
+ .collapsible {
3
+ border-left-color: #888;
4
+ position: relative;
5
+ }
6
+ .collapsible .admonition-title {
7
+ cursor: pointer;
8
+ user-select: none;
9
+ padding-right: 2.5rem;
10
+ }
11
+ .collapsible .admonition-title {
12
+ position: relative;
13
+ }
14
+ .collapsible .collapsible-toggle {
15
+ position: absolute;
16
+ right: 1.2rem;
17
+ top: 50%;
18
+ transform: translateY(-50%);
19
+ font-size: 1.2rem;
20
+ background: none;
21
+ border: none;
22
+ cursor: pointer;
23
+ outline: none;
24
+ margin: 0;
25
+ padding: 0;
26
+ line-height: 1;
27
+ }
28
+ .collapsible.expanded {
29
+ /* Optionally highlight expanded state */
30
+ }
31
+ .collapsible-content {
32
+ display: none;
33
+ }
34
+ .collapsible.expanded .collapsible-content {
35
+ display: block;
36
+ }
37
+ /**
38
+ * @credits https://github.com/qjebbs/vscode-markdown-extended
39
+ * @copyright 2018 jebbs
40
+ * @license MIT
41
+ */
42
+
43
+ @font-face {
44
+ font-family: "Material Icons";
45
+ font-style: normal;
46
+ font-weight: 400;
47
+ src: url(https://fonts.gstatic.com/s/materialicons/v92/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
48
+ }
49
+
50
+ .admonition {
51
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12), 0 3px 1px -2px rgba(0, 0, 0, .2);
52
+ position: relative;
53
+ margin: 1.5625em 0;
54
+ padding: 0 1.2rem;
55
+ border-left: .4rem solid rgba(68, 138, 255, .8);
56
+ border-radius: .2rem;
57
+ background-color: rgba(255, 255, 255, 0.05);
58
+ overflow: auto;
59
+ }
60
+
61
+ .admonition>p {
62
+ margin-top: .8rem;
63
+ }
64
+
65
+ .admonition>.admonition-title {
66
+ margin: 0 -1.2rem;
67
+ padding: .8rem 1.0rem .8rem 1.0rem;
68
+ border-bottom: 1px solid rgba(68, 138, 255, .2);
69
+ background-color: rgba(68, 138, 255, .1);
70
+ font-weight: 700;
71
+ }
72
+
73
+ .admonition>.admonition-title:before {
74
+ position: absolute;
75
+ left: 1.0rem;
76
+ font-size: 1.5rem;
77
+ /* color: rgba(68, 138, 255, .8); */
78
+ /* content: "\f05b"; */
79
+ }
80
+
81
+ .admonition>.admonition-title:before {
82
+ font-family: Material Icons;
83
+ font-style: normal;
84
+ font-variant: normal;
85
+ font-weight: 400;
86
+ line-height: 1.2rem;
87
+ text-transform: none;
88
+ white-space: nowrap;
89
+ word-wrap: normal;
90
+ direction: ltr;
91
+ }
92
+
93
+ .admonition.note>.admonition-title {
94
+ padding-left: 3.3rem;
95
+ }
96
+
97
+ .admonition.note>.admonition-title:before {
98
+ color: rgba(68, 138, 255, .8);
99
+ content: "\f05b";
100
+ }
101
+
102
+ .admonition.summary, .admonition.abstract, .admonition.tldr {
103
+ border-left-color: rgba(0, 176, 255, .8);
104
+ }
105
+
106
+ .admonition.summary>.admonition-title, .admonition.abstract>.admonition-title, .admonition.tldr>.admonition-title {
107
+ background-color: rgba(0, 176, 255, .1);
108
+ border-bottom-color: rgba(0, 176, 255, .2);
109
+ padding-left: 3.3rem;
110
+ }
111
+
112
+ .admonition.summary>.admonition-title:before, .admonition.abstract>.admonition-title:before, .admonition.tldr>.admonition-title:before {
113
+ color: rgba(0, 176, 255, 1);
114
+ content: "\E8D2";
115
+ }
116
+
117
+ .admonition.hint, .admonition.tip {
118
+ border-left-color: rgba(0, 191, 165, .8);
119
+ }
120
+
121
+ .admonition.hint>.admonition-title, .admonition.tip>.admonition-title {
122
+ background-color: rgba(0, 191, 165, .1);
123
+ border-bottom-color: rgba(0, 191, 165, .2);
124
+ padding-left: 3.3rem;
125
+ }
126
+
127
+ .admonition.hint>.admonition-title:before, .admonition.tip>.admonition-title:before {
128
+ color: rgba(0, 191, 165, 1);
129
+ content: "\E80E";
130
+ }
131
+
132
+ .admonition.info, .admonition.todo {
133
+ border-left-color: rgba(0, 184, 212, .8);
134
+ }
135
+
136
+ .admonition.info>.admonition-title, .admonition.todo>.admonition-title {
137
+ background-color: rgba(0, 184, 212, .1);
138
+ border-bottom-color: rgba(0, 184, 212, .2);
139
+ padding-left: 3.3rem;
140
+ }
141
+
142
+ .admonition.info>.admonition-title:before, .admonition.todo>.admonition-title:before {
143
+ color: rgba(0, 184, 212, 1);
144
+ content: "\E88E";
145
+ }
146
+
147
+ .admonition.success, .admonition.check, .admonition.done {
148
+ border-left-color: rgba(0, 200, 83, .8);
149
+ }
150
+
151
+ .admonition.success>.admonition-title, .admonition.check>.admonition-title, .admonition.done>.admonition-title {
152
+ background-color: rgba(0, 200, 83, .1);
153
+ border-bottom-color: rgba(0, 200, 83, .2);
154
+ padding-left: 3.3rem;
155
+ }
156
+
157
+ .admonition.success>.admonition-title:before, .admonition.check>.admonition-title:before, .admonition.done>.admonition-title:before {
158
+ color: rgba(0, 200, 83, 1);
159
+ content: "\E876";
160
+ }
161
+
162
+ .admonition.question, .admonition.help, .admonition.faq {
163
+ border-left-color: rgba(100, 221, 23, .8);
164
+ }
165
+
166
+ .admonition.question>.admonition-title, .admonition.help>.admonition-title, .admonition.faq>.admonition-title {
167
+ background-color: rgba(100, 221, 23, .1);
168
+ border-bottom-color: rgba(100, 221, 23, .2);
169
+ padding-left: 3.3rem;
170
+ }
171
+
172
+ .admonition.question>.admonition-title:before, .admonition.help>.admonition-title:before, .admonition.faq>.admonition-title:before {
173
+ color: rgba(100, 221, 23, 1);
174
+ content: "\E887";
175
+ }
176
+
177
+ .admonition.warning, .admonition.attention, .admonition.caution {
178
+ border-left-color: rgba(255, 145, 0, .8);
179
+ }
180
+
181
+ .admonition.warning>.admonition-title, .admonition.attention>.admonition-title, .admonition.caution>.admonition-title {
182
+ background-color: rgba(255, 145, 0, .1);
183
+ border-bottom-color: rgba(255, 145, 0, .2);
184
+ padding-left: 3.3rem;
185
+ }
186
+
187
+ .admonition.attention>.admonition-title:before {
188
+ color: rgba(255, 145, 0, 1);
189
+ content: "\E417";
190
+ }
191
+
192
+ .admonition.warning>.admonition-title:before, .admonition.caution>.admonition-title:before {
193
+ color: rgba(255, 145, 0, 1);
194
+ content: "\E002";
195
+ }
196
+
197
+ .admonition.failure, .admonition.fail, .admonition.missing {
198
+ border-left-color: rgba(255, 82, 82, .8);
199
+ }
200
+
201
+ .admonition.failure>.admonition-title, .admonition.fail>.admonition-title, .admonition.missing>.admonition-title {
202
+ background-color: rgba(255, 82, 82, .1);
203
+ border-bottom-color: rgba(255, 82, 82, .2);
204
+ padding-left: 3.3rem;
205
+ }
206
+
207
+ .admonition.failure>.admonition-title:before, .admonition.fail>.admonition-title:before, .admonition.missing>.admonition-title:before {
208
+ color: rgba(255, 82, 82, 1);
209
+ content: "\E14C";
210
+ }
211
+
212
+ .admonition.danger, .admonition.error, .admonition.bug {
213
+ border-left-color: rgba(255, 23, 68, .8);
214
+ }
215
+
216
+ .admonition.danger>.admonition-title, .admonition.error>.admonition-title, .admonition.bug>.admonition-title {
217
+ background-color: rgba(255, 23, 68, .1);
218
+ border-bottom-color: rgba(255, 23, 68, .2);
219
+ padding-left: 3.3rem;
220
+ }
221
+
222
+ .admonition.danger>.admonition-title:before {
223
+ color: rgba(255, 23, 68, 1);
224
+ content: "\E3E7";
225
+ }
226
+
227
+ .admonition.error>.admonition-title:before {
228
+ color: rgba(255, 23, 68, 1);
229
+ content: "\e000";
230
+ }
231
+
232
+ .admonition.bug>.admonition-title:before {
233
+ color: rgba(255, 23, 68, 1);
234
+ content: "\E868";
235
+ }
236
+
237
+ .admonition.example, .admonition.snippet {
238
+ border-left-color: rgba(0, 184, 212, .8);
239
+ }
240
+
241
+ .admonition.example>.admonition-title, .admonition.snippet>.admonition-title {
242
+ background-color: rgba(0, 184, 212, .1);
243
+ border-bottom-color: rgba(0, 184, 212, .2);
244
+ padding-left: 3.3rem;
245
+ }
246
+
247
+ .admonition.example>.admonition-title:before, .admonition.snippet>.admonition-title:before {
248
+ color: rgba(0, 184, 212, 1);
249
+ content: "\e86f";
250
+ }
251
+
252
+ .admonition.quote, .admonition.cite {
253
+ border-left-color: rgba(158, 158, 158, .8);
254
+ }
255
+
256
+ .admonition.quote>.admonition-title, .admonition.cite>.admonition-title {
257
+ background-color: rgba(158, 158, 158, .1);
258
+ border-bottom-color: rgba(158, 158, 158, .2);
259
+ padding-left: 3.3rem;
260
+ }
261
+
262
+ .admonition.quote>.admonition-title:before, .admonition.cite>.admonition-title:before {
263
+ color: rgba(158, 158, 158, 1);
264
+ content: "\E244";
265
+ }