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
This commit adds 5 new roles,
for using Google's Material Design Icons as inline text.
Each role represents a different material design "flavor":
- `material-regular`
- `material-outlined`
- `material-sharp`
- `material-round`
- `material-twotone`
Co-authored-by: Chris Sewell <[email protected]>
Copy file name to clipboardExpand all lines: docs/badges_buttons.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,14 +175,16 @@ class
175
175
176
176
## Inline Icons
177
177
178
-
Inline icon roles are available for both the [GitHub octicon](https://primer.style/octicons/) or [FontAwesome](https://fontawesome.com/icons?d=gallery&m=free) libraries.
178
+
Inline icon roles are available for the [GitHub octicon](https://primer.style/octicons/), [Google Material Design Icons](https://github.com/google/material-design-icons), or [FontAwesome](https://fontawesome.com/icons?d=gallery&m=free) libraries.
179
179
180
-
Octicon icons are added as SVG's directly into the page with the `octicon`role.
180
+
Octicon icons and Material icons are added as SVG's directly into the page with the `octicon`and `material-<flavor>` roles. See below for the different flavors of Material Design Icons.
181
181
182
182
By default the icon will be of height `1em` (i.e. the height of the font).
183
183
A specific height can be set after a semi-colon (`;`) with units of either `px`, `em` or `rem`.
184
184
Additional CSS classes can also be added to the SVG after a second semi-colon (`;`) delimiter.
185
185
186
+
### Octicon Icons
187
+
186
188
A coloured icon: {octicon}`report;1em;sd-text-info`, some more text.
187
189
188
190
````{tab-set-code}
@@ -201,6 +203,36 @@ A coloured icon: {octicon}`report;1em;sd-text-info`, some more text.
201
203
```
202
204
````
203
205
206
+
### Material Design Icons
207
+
208
+
Material Design icons come as several flavors. Each flavor represents a different role used in sphinx-design. These flavors are:
209
+
210
+
-`material-regular`
211
+
-`material-outlined`
212
+
-`material-round`
213
+
-`material-sharp`
214
+
-`material-twotone`
215
+
216
+
Not all icons are available for each flavor, but most are. Instead of displaying the 10660+ icons here, you are encouraged to browse the available icons from the [Material Design Icons' showcase](https://fonts.google.com/icons) hosted by Google.
217
+
218
+
- A regular icon: {material-regular}`data_exploration;2em`, some more text
219
+
- A coloured regular icon: {material-regular}`settings;3em;sd-text-success`, some more text.
220
+
- A coloured outline icon: {material-outlined}`settings;3em;sd-text-success`, some more text.
221
+
- A coloured sharp icon: {material-sharp}`settings;3em;sd-text-success`, some more text.
222
+
- A coloured round icon: {material-round}`settings;3em;sd-text-success`, some more text.
223
+
- A coloured two-tone icon: {material-twotone}`settings;3em;sd-text-success`, some more text.
FontAwesome icons are added via the Fontawesome CSS classes.
205
237
If the theme you are using does not already include the FontAwesome CSS, it should be loaded in your configuration from a [font-awesome CDN](https://cdnjs.com/libraries/font-awesome), with the [html_css_files](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_css_files) option, e.g.:
0 commit comments