Template:Icon/doc
Jump to navigation
Jump to search
Displays an icon.
| Markup | Renders as |
|---|---|
{{icon | Flourish Icon.png }} |
The default size is x25px meaning the icon is scaled until the height is 25 px. This is important as this template is often used inline -- especially indirectly through {{icon link}} -- thus controlling the height matters the most. An alternative value for the size can be provided like so:
| Markup | Renders as |
|---|---|
{{icon | Flourish Icon.png | 30 }} | |
{{icon | Flourish Icon.png | 50 }} |
Alternatively you can use the named parameters w and/or h. Note that these are max values, so the more limiting one applies, based on the icon's original resolution. For example, in the following, the height value is effectively ignored, because the original image is a square, so the width becomes the limiting factor.
| Markup | Renders as |
|---|---|
{{icon | Flourish Icon.png | w = 20 | h = 50 }} |
An alt text can be applied to the image through the optional caption parameter.
Examples
| Example | Markup | Renders as |
|---|---|---|
| Width only | {{icon | Advantage Icon.png | w = 25 }} | |
| Height only | {{icon | Advantage Icon.png | h = 25 }} | |
| With a link | {{icon | Flourish Icon.png | link = Flourish }} | |
| With alt text | {{icon | Flourish Icon.png | link = Flourish | caption = Blah }} | |
| Missing icon | {{icon | Missing Filename 123.png | link = Flourish }} | |
| Drop shadow | {{icon | Flourish Icon.png | class = bg3wiki-lightmode-drop-shadow }} |





