Skip to content

Commit a4d0f13

Browse files
committed
Documentation
1 parent f9e6b94 commit a4d0f13

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

docs/reference/tooltips.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ following lines to `mkdocs.yml`:
1919
``` yaml
2020
markdown_extensions:
2121
- abbr
22+
- attr_list
2223
- pymdownx.snippets
2324
```
2425
2526
See additional configuration options:
2627
2728
- [Abbreviations]
29+
- [Attribute Lists]
2830
- [Snippets]
2931
3032
[Abbreviations]: ../setup/extensions/python-markdown.md#abbreviations
33+
[Attribute Lists]: ../setup/extensions/python-markdown.md#attribute-lists
3134
[Snippets]: ../setup/extensions/python-markdown-extensions.md#snippets
3235
3336
### Improved tooltips
@@ -60,9 +63,9 @@ Now, tooltips will be rendered for the following elements:
6063

6164
The [Markdown syntax] allows to specify a `title` for each link, which will
6265
render as a beautiful tooltip when [improved tooltips] are enabled. Add a
63-
tooltip to an link with the following lines:
66+
tooltip to a link with the following lines:
6467

65-
``` markdown title="Link with title, inline syntax"
68+
``` markdown title="Link with tooltip, inline syntax"
6669
[Hover me](https://example.com "I'm a tooltip!")
6770
```
6871

@@ -74,7 +77,7 @@ tooltip to an link with the following lines:
7477

7578
Tooltips can also be added to link references:
7679

77-
``` markdown title="Link with title, reference syntax"
80+
``` markdown title="Link with tooltip, reference syntax"
7881
[Hover me][example]
7982
8083
[example]: https://example.com "I'm a tooltip!"
@@ -84,6 +87,19 @@ Tooltips can also be added to link references:
8487

8588
[Hover me](https://example.com "I'm a tooltip!")
8689

90+
</div>
91+
92+
For all other elements, a `title` can be added by using the [Attribute Lists]
93+
extension:
94+
95+
``` markdown title="Icon with tooltip"
96+
:material-information-outline:{ title="Important information" }
97+
```
98+
99+
<div class="result" markdown>
100+
101+
:material-information-outline:{ title="Important information" }
102+
87103
</div>
88104

89105
[Markdown syntax]: https://daringfireball.net/projects/markdown/syntax#link

docs/setup/extensions/python-markdown.md

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ No configuration options are available. See reference for usage:
8484
- [Using annotations]
8585
- [Using grids]
8686
- [Adding buttons]
87+
- [Adding tooltips]
8788
- [Using icons with colors]
8889
- [Using icons with animations]
8990
- [Image alignment]
@@ -94,6 +95,7 @@ No configuration options are available. See reference for usage:
9495
[Attribute Lists limitations]: https://python-markdown.github.io/extensions/attr_list/#limitations
9596
[Using grids]: ../../reference/grids.md#using-grids
9697
[Adding buttons]: ../../reference/buttons.md#adding-buttons
98+
[Adding tooltips]: ../../reference/tooltips.md#adding-tooltips
9799
[Using icons with colors]: ../../reference/icons-emojis.md#with-colors
98100
[Using icons with animations]: ../../reference/icons-emojis.md#with-animations
99101
[Image alignment]: ../../reference/images.md#image-alignment

0 commit comments

Comments
 (0)