Template:Text-icon/doc

From Angelina Jordan Wiki
Revision as of 01:10, 12 July 2024 by Dcljr (talk | contribs) (more expansion)
This is a subpage documenting Template:Text-icon. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

Documentation

This template displays a little makeshift text-only icon. This is usually called from other more "useful" templates.

Usage

  • {{text-icon|text=|color=|background-color=|font-weight=|font-family=|border=|tip=}}

The text shown in the icon (usually a single character) is specified in the parameter text. For convenience, this can also be passed to the template in the first positional parameter (i.e., you can omit "text=" in the template call).

The parameters color, background-color, font-weight, font-family, and border are used as the values of the same-named CSS style attributes in a <span> element. See, for example, W3C's CSS2 documentation for valid values.

The parameter tip can be used to specify a "tooltip" to show when the reader "hovers" on the icon. Note that some templates that call this one already have their own mechanisms for creating tooltips. This will be remedied shortly.

Examples

  • {{text-icon|text=🞂}} 🞂 
  • {{text-icon|text=🞂|color=white|background-color=red}} 🞂 
  • {{text-icon|text=i|color=white|background-color=blue|font-weight=bold|font-family=monospace|tip=information}} i