Predefinição:Letter-spacing
Essa predefinição utiliza um elemento Veja H:DIVSPAN para maiores detalhes. |
Documentation
editarThis template simplifies formatting text that has letter-spacing.
The shorthand of this template is {{lsp}} or {{lp}}.
There is also a shorthand named {{sp}} that only takes one parameter and always uses the spacing .15em.
Parameters
editar- 1: The letter spacing. Can be left blank for the default of 0.15em. Always use text-relative sizes like em, not px, because px will not adjust itself if the text size changes. (See en:H:PXWIDTH for more details).
- 2: The text to be spaced.
- 3: Following un-spaced text. Useful for following punctuation that butts up against the last character of the spaced text. Optional.
- 4 and 5: Another spaced/unspaced pair. Can be useful for certain headings where there are two un-spaced punctuation marks (e.g. "Chap. VII."). If 4 is a space, use
, or it will be removed by the template argument parser.
Examples
editarSpacing
editarExemplo: Default/explicit spacing (0.15em)
* {{letter-spacing||your text goes here}} * {{letter-spacing|0.15em|your text goes here}}
- your text goes here
- your text goes here
Exemplo: Custom spacing 1.5em)
{{letter-spacing|1.5em|your text goes here}}
your text goes here
Last characters
editarIf you need to exclude the last character(s) of spaced text (usually due to excess padding) but still want these characters to be wrapped (usually for clearer syntax), you can use a third unnamed parameter, which simply passes its input as-is.
Furthermore, you can use the fourth and fifth parameters for a subsequent spaced section (this is sometimes useful for cases like "Chap. II.").
In the following examples, the coloured boxes show the extend of the "spaced" text.
C. {{letter-spacing|1.5em|192|2.}}}}
Compare to...
C. {{letter-spacing|1.5em|1922}}. {{letter-spacing|1.5em|C.}} {{letter-spacing|1.5em|1922.}}}}
1922.
C.
1922.Comparison of syntax appearance:
These examples produce the same output, but the template syntax is clearer in the second:
{{letter-spacing|1.5em|192}}2. {{letter-spacing|1.5em|192|2.}} {{letter-spacing|1.5em|Cha}}p.{{letter-spacing|1.5em| I}}I. {{letter-spacing|1.5em|Cha|p.| I|I.}}
1922.
1922.
Chap. II.
Chap. II.
See also
editar- {{Word-spacing}}
- {{Letter-spacing-normal}}
Sem descrição.
Parâmetro | Descrição | Tipo | Estado | |
---|---|---|---|---|
1 | 1 | letter spacing (Use CSS units , but not px (pixels) | String | obrigatório |
2 | 2 | Text on which letter spacing is to be applied. | Desconhecido | opcional |
3 | 3 | sem descrição | Desconhecido | opcional |
4 | 4 | sem descrição | Desconhecido | opcional |
5 | 5 | sem descrição | Desconhecido | opcional |
A documentação acima é transcluída de Predefinição:Letter-spacing/doc. (editar | histórico) Editores podem experimentar nas páginas de teste (criar | espelhar) e de exemplos para testes (criar) desta predefinição. Por favor adicione categorias à subpágina /doc. Subpáginas desta predefinição. |