mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-03 02:49:18 -04:00
Modernized look of admonitions
This commit is contained in:
@@ -388,6 +388,46 @@ the default type, and thus fallback for unknown type qualifiers, is `note`:
|
||||
|
||||
## Customization
|
||||
|
||||
### Classic admonitions
|
||||
|
||||
Prior to version [:octicons-tag-24: 8.6.0][Admonition modern], admonitions had
|
||||
a slightly different appearance:
|
||||
|
||||
!!! classic "Note"
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
|
||||
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
|
||||
massa, nec semper lorem quam in massa.
|
||||
|
||||
If you want to restore this appearance, add the following CSS to an
|
||||
[additional style sheet]:
|
||||
|
||||
<style>
|
||||
.md-typeset .admonition.classic {
|
||||
border-width: 0;
|
||||
border-left-width: 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
=== ":octicons-file-code-16: `docs/stylesheets/extra.css`"
|
||||
|
||||
``` css
|
||||
.md-typeset .admonition,
|
||||
.md-typeset details {
|
||||
border-width: 0;
|
||||
border-left-width: 4px;
|
||||
}
|
||||
```
|
||||
|
||||
=== ":octicons-file-code-16: `mkdocs.yml`"
|
||||
|
||||
``` yaml
|
||||
extra_css:
|
||||
- stylesheets/extra.css
|
||||
```
|
||||
|
||||
[Admonition modern]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.6.0
|
||||
|
||||
### Custom admonitions
|
||||
|
||||
If you want to add a custom admonition type, all you need is a color and an
|
||||
|
||||
@@ -32,7 +32,7 @@ The following configuration options are available:
|
||||
|
||||
[`tags_file`](#+tags.tags_file){ #+tags.tags_file }
|
||||
|
||||
: :octicons-milestone-24: Default: _none_ – This option specifies which file
|
||||
: :octicons-milestone-24: Default: _none_ – This option specifies which page
|
||||
should be used to render the tags index. See the section on [adding a tags
|
||||
index][tags index] for more information. If this option is specified, tags
|
||||
will become clickable, pointing to the corresponding section in the tags
|
||||
@@ -48,7 +48,7 @@ The following configuration options are available:
|
||||
of `mkdocs.yml`. Note, however, that this options is not required – only use
|
||||
it if you want a tags index page.
|
||||
|
||||
[`tags_extra_files`](#+tags.tags_extra_files){ #+tags.tags_extra_files } :material-alert-decagram:{ .mdx-pulse title="Added on July 7, 2022" }
|
||||
[`tags_extra_files`](#+tags.tags_extra_files){ #+tags.tags_extra_files }
|
||||
|
||||
: [:octicons-tag-24: insiders-4.20.0][Insiders] · :octicons-milestone-24:
|
||||
Default: _none_ – This option allows to define additional pages to render
|
||||
|
||||
Reference in New Issue
Block a user