You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A block admonition is converted to MyST admonition block directive. If the admonition has a title, then the {admonition} directive is used. The type of the admonition is passed as the class attribute.
admonition_type: NOTE | TIP | IMPORTANT | CAUTION | WARNING
Other classes can also be added to the class attribute. For example, if [%collapsible] option is specified for the admonition block, then “dropdown” will also be added to the class attribute
In both cases above, note that we are using 4 backquotes instead of 3. That’s because an admonition can have other directives nested in it. So it needs to have more than 3 backquotes. The minimum required number depends on the levels of nesting. Dynamically assigning the backquotes depending on their nested directives, is currently out of the scope of this project.
Reiterating from #106 but it bares repeating IMO 😸
We explicitly don't/won't support MYST syntax which directly influences HTML.
So we never use :class: to set the admonition type or influence any other directive for that matter.
So we'll never want to expose new features by adding a 'class' as per:
Other classes can also be added to the class attribute. For example, if [%collapsible] option is specified for the admonition block, then “dropdown” will also be added to the class attribute
In the case of [%collapsible]docs-builder supports two options today:
Adding the :open: <bool> option to an admonition.
```{note}
:open:
Longer content can be collapsed to take less space.
```
Or we support a more general dropdown region with the {dropdown} directive
```{dropdown} Dropdown Title
:open:
Dropdown content
```
```{dropdown} Dropdown Title
Dropdown content
```
In both cases above, note that we are using 4 backquotes instead of 3. That’s because an admonition can have other directives nested in it. So it needs to have more than 3 backquotes. The minimum required number depends on the levels of nesting. Dynamically assigning the backquotes depending on their nested directives, is currently out of the scope of this project.
I would caution against this. Make 3 backticks the default only use 4 or more when you start needing to include nested directives which should be rare from a UX perspective in my opinion.
If this comes up a lot I suspect it might be hiding a new directives use case.
Activity
Mpdreamz commentedon Dec 17, 2024
Reiterating from #106 but it bares repeating IMO 😸
So we'll never want to expose new features by adding a 'class' as per:
In the case of
[%collapsible]docs-buildersupports two options today:Adding the
:open: <bool>option to an admonition.Or we support a more general dropdown region with the
{dropdown}directiveI would caution against this. Make 3 backticks the default only use
4or more when you start needing to include nested directives which should be rare from a UX perspective in my opinion.If this comes up a lot I suspect it might be hiding a new directives use case.
bmorelli25 commentedon Jan 10, 2025
Thanks. Added to list of things to fix in migration tooling.
bmorelli25 commentedon Jan 13, 2025
Fixed in tooling.