File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,26 @@ and/or by overriding templates.
5
5
6
6
## CSS classes
7
7
8
+ Our templates add [ CSS] ( https://www.w3schools.com/Css/ ) classes to many HTML elements
9
+ to make it possible for users to customize the resulting look and feel.
10
+
11
+ To add CSS rules and style mkdocstrings' output,
12
+ put them in a CSS file in your docs folder, for example in ` docs/css/mkdocstrings.css ` ,
13
+ and reference this file in [ MkDocs' ` extra_css ` configuration option] ( https://www.mkdocs.org/user-guide/configuration/#extra_css ) :
14
+
15
+ ``` yaml title="mkdocs.yml"
16
+ extra_css :
17
+ - css/mkdocstrings.css
18
+ ` ` `
19
+
20
+ Example:
21
+
22
+ ` ` ` css title="docs/css/mkdocstrings.css"
23
+ .doc-section-title {
24
+ font-weight : bold;
25
+ }
26
+ ```
27
+
8
28
The following CSS classes are used in the generated HTML:
9
29
10
30
- ` doc ` : on all the following elements
@@ -22,6 +42,8 @@ The following CSS classes are used in the generated HTML:
22
42
- ` doc-labels ` : on ` span ` s wrapping the object's labels
23
43
- ` doc-label ` : on ` small ` elements containing a label
24
44
- ` doc-label-LABEL ` : same, where ` LABEL ` is replaced by the actual label
45
+ - ` doc-section-title ` : on section titles (depend on the [ selected style for section rendering] [ docstring_style ] )
46
+ - ` doc-section-item ` : on section items (depend on the [ selected style for section rendering] [ docstring_style ] )
25
47
- ` doc-md-description ` : on ` div ` s containing HTML descriptions converted from Markdown docstrings
26
48
- ` doc-symbol ` : on ` code ` tags of symbol types
27
49
- ` doc-symbol-heading ` : on symbol types in headings
You can’t perform that action at this time.
0 commit comments