Skip to content

Commit 2d500cf

Browse files
authored
📚 DOCS:: Update for dropdown class (#19)
- I was trying to use this extension, and got confused because the readme wasn't updated for the new `dropdown` class and `toggle-shown` semantics (as opposed to being shown by default with toggle-hidden as an option). Ref: 8cebb39, #13 - I fixed it to save others some time, since this took quite a while to figure out... - Review: make sure it's correct, I didn't miss anywhere, this is what the future is. - also fix the "container" part at the bottom - should this be updated to the toggle directive or is that still true?
1 parent ceb80a8 commit 2d500cf

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎README.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,26 @@ extensions = [
3131
]
3232
```
3333
Now, whenever you wish for an admonition to be toggle-able, add the
34-
`:class: toggle` parameter to the admonition directive that you use.
34+
`:class: dropdown` parameter to the admonition directive that you use.
3535

36-
For example, this code would create a toggle-able "note" admonition:
36+
For example, this code would create a toggle-able "note" admonition
37+
that starts hidden:
3738

3839
```rst
3940
.. note::
40-
:class: toggle
41+
:class: dropdown
4142
4243
This is my note.
4344
```
4445

4546
Clicking on the toggle button will toggle the item's visibility.
4647

47-
You may also **hide the content by default**. To do so, add the `toggle`
48-
class *as well as* a `toggle-hidden` class, like so:
48+
You may also **show the content by default**. To do so, add the `dropdown`
49+
class *as well as* a `toggle-shown` class, like so:
4950

5051
```rst
5152
.. note::
52-
:class: toggle, toggle-hidden
53+
:class: dropdown, toggle-shown
5354
5455
This is my note.
5556
```

0 commit comments

Comments
 (0)