Template:Light-dark switch
Appearance
[[File:|100px
|link=File: ]]
[[File:|100px
|link=File: ]]
| This template uses TemplateStyles: |
This template is a refined version of {{dark mode switch}}. It is intended for SVGs that are mostly either purely black or white vector rendering, but also contain material that is coloured and that should not simply be inverted wholly using the class=skin-invert parameter – ones containing flags, for example.
Usage
[edit]There are two ways this template can be used.
Base name
[edit]This can only be used with SVGs, and these two SVG files must have the same name, except for ending either in (light mode) or (dark mode).
For example, these two files:
New Guard emblem (light mode).svgNew Guard emblem (dark mode).svg
To display them:
{{light-dark switch
| base=New Guard emblem
| size=80px
| link=New Guard
}}
The output:
Explicit files
[edit]This supports SVGs and other image formats. The two files can have different names and can also be different formats.
For example, these two files:
Israel-Palestine peace.svgIsrael–Palestine handshake (dark mode).svg
To display them:
{{light-dark switch
| light=Israel-Palestine peace.svg
| dark=Israel–Palestine handshake (dark mode).svg
| size=80px
| link=New Guard
}}
The output:
See also
[edit]- {{dark mode switch}}
- {{if dark}}