Template:Smallcaps/doc

From Festipedia, hosted by the FR Heritage Group

{{Smallcaps}} will display the lowercase part of your text as a soft format of typographical small caps.
For example: {{Smallcaps|Beware of Dog}}Beware of Dog.

This template should be avoided or used sparingly in articles.

Usage[edit]

Your source text is not altered in the output, only the way it is displayed on the screen: a copy-paste of the text will give the small caps sections in their original form; similarly, an older or non-CSS browser will only display the original text on screen.

Code
{{Smallcaps|Utada}} Hikaru
Displayed
Utada Hikaru
Pasted
Utada Hikaru

This template is therefore intended for the use of caps as a typographic style, such as rendering family names in bibliographies in small caps to distinguish them from given names. It should not be used for acronyms or abbreviations which are supposed to be capitalized regardless of style.

This template cannot be used in citation templates like {{Cite journal}} to small-cap the author names, or titles of works, in citations styles that call for such typography.

Technical notes[edit]

  • Diacritics (å, ç, é, ğ, ı, ñ, ø, ş, ü, etc.) are handled. However, because the job is performed by each reader's browser, inconsistencies in CSS implementations can lead to some browsers not converting certain rare diacritics.
  • Use of this template does not generate any automatic categorization. As with most templates, if the argument contains an = sign, the sign should be replaced with {{=}}, or the whole argument be prefixed with |1=. And for wikilinks, you need to use piping. There is a parsing problem with MediaWiki which causes unexpected behavior when a template with one style is used within a template with another style.
  • This template will not affect the use of HTML character entities like  .
  • Technically, the template is a wrapper for: <span style="font-variant: small-caps;"> ... </span>
  • A potential alternative CSS approach, font-variant: small-caps; text-transform: lowercase;, has not been used because it does not work at least in Internet Explorer 5 and 6, which are still fairly common browsers, and it is implemented inconsistently in others, such that it copy-pastes as the original text in Firefox, but as the altered text in Chrome, Safari, Opera, and text-only browsers.

Suppressing small caps

If you wish to suppress the display of small caps in your browser, as a logged-in user, you can make an edit to your common.css reading:

span.smallcaps { font-variant: normal !important; }