Template:Link style

From Hololive Fan Wiki
Revision as of 02:18, 14 September 2021 by Aesulus (talk | contribs)

This template lets you style wikilinks (a.k.a internal links). Technically speaking, it is mainly used to style the text-decoration, color, and background attributes, which are often overridden in <a></a> tags placed post hoc by the wikitext parser. The alias ls can be used instead of Link style.

Usage

{{Link style|link target|link text|style=style}}

  • link target - Required. The name of the wiki page you want to link to.
  • link text - Optional. The text to display instead.
  • style – Optional. Takes the value of color:#ffffff; if omitted. You will need to add quotation marks if you have spaces.

Examples

  • {{Link style|Hololive Production|Hololive|style="background:#27c7fe; color:#ffffff;"}} = Hololive
  • <span style="background-color:#27c7fe;>{{ls|Hololive Production}}</span> = Hololive Production

External links

This template does not work for external links. To style external links, just do something like this:

[https://en.wikipedia.org/wiki/Hololive_Production <span style="color:#27c7fe;">Hololive Production on the English Wikipedia</span>] = Hololive Production on the English Wikipedia

What if I only want to style part of a link text?

For more granular control, don't use this template. Instead, here is basically how this template works.

[[Hololive Production|<span style="text-decoration:red wavy underline">Hololive</span> Production]] = Hololive Production