Template:Icon
More actions
This Template page is licensed under CC BY-SA 4.0. See bg3.wiki's Template:Icon for the original. |
Displays an icon.
| Markup | Renders as |
|---|---|
{{icon | First Aid 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 usually used inline and controlling the height matters the most.
An alternative value for the icon can be provided like so:
| Markup | Renders as |
|---|---|
{{icon | First Aid Icon.png | 30 }} | |
{{icon | First Aid 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. In the following example, the height value is essentially ignored because the original image is a square so the width becomes the limiting factor. (Were the original image 200 by 500, the result would be 20 by 50.)
It's usually important to limit the height since the icons are used inline, and a very high inline image makes for an unpleasant text layout.
| Example | Markup | Renders as |
|---|---|---|
| Width and height | {{icon | First Aid Icon.png | w = 20 | h = 50 }} | |
| Width only | {{icon | Magic_Armour.png | w = 25 }} | |
| Height only | {{icon | Magic_Armour.png | h = 25 }} | |
| With a link | {{icon | First Aid Icon.png | link = First Aid }} | |
| With alt text | {{icon | First Aid Icon.png | link = First Aid | caption = Blah }} | |
| Missing icon | {{icon | Missing Filename 123.png | link = First Aid }} | |
| Drop shadow | {{icon | First Aid Icon.png | class = dos2wiki-lightmode-drop-shadow }} |