Difference between revisions of "User:Evon R'al/Sandbox template/doc"

From EVE University Wiki
Jump to: navigation, search
m (Blank page for next project)
Tag: Blanking
m (Working on template {{Lex}}doc.)
Line 1: Line 1:
 +
; Description
 +
: This is a template exclusively used for the [[EVE Lexicon]] page, to tidy up the list of abbreviations and acronyms and make editing the list easy without losing functionality like highlighting words, allowing for links (anchors) etc.
  
 +
; Syntax
 +
: {{T|Lex|word|description|4=ws= ws}}
 +
:: '''word''' - Abbreviation, acronym or word that needs explanation.
 +
:: '''description''' - The meaning of word (Can contain formatting, links, etc.)
 +
:: '''ws=''' - Control of the white-space<ref name="white-space" /> behavior in the description field. When omitted the behavior defaults to pre-wrap (i.e. Sequences of white space are preserved. Lines are broken at newline characters, at <nowiki><br></nowiki>, and as necessary to fill line boxes.).<br> If ws= is used without an actual value then the white-space property is not added to the style, so if no other white-space property is set, it will fallback to normal (i.e. Sequences of white space are collapsed. Newline characters in the source are handled the same as other white space. Lines are broken as necessary to fill line boxes.)<br> The ws parameter is of importance when using lists, either numbered(#) or unnumbered(*). if ws is not used when a list is used this results in an extra empty line between the list elements. A simple ws= is enough to fix this.<br>Valid values of ws are: normal, nowrap, pre, pre-line, pre-wrap, initial and inherit.
 +
 +
; Sample
 +
: {{Code|<nowiki>{{Lex|Word|Description}}</nowiki>}} gives...
 +
{{Lex|Word|Description}}
 +
 +
: List withour the ws parameter
 +
: {{Code|<nowiki>{{Lex|Word|
 +
# Item one
 +
# Item two}}</nowiki>}} gives...
 +
{{Lex|Word|
 +
# Item one
 +
# Item two}}
 +
 +
: List with the ws parameter
 +
: {{Code|<nowiki>{{Lex|Word|ws=|
 +
# Item one
 +
# Item two}}</nowiki>}} gives...
 +
{{Lex|Word|ws=|
 +
# Item one
 +
# Item two}}
 +
 +
== References ==
 +
<references>
 +
<ref name="white-space">For more information see: <br>
 +
[https://www.w3schools.com/cssref/pr_text_white-space.asp w3schools]<br>
 +
[https://developer.mozilla.org/en-US/docs/Web/CSS/white-space MDN]</ref>
 +
</references>
 +
 +
<includeonly>[[Category:Formatting templates]]</includeonly>
 +
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 12:21, 25 April 2022

Description
This is a template exclusively used for the EVE Lexicon page, to tidy up the list of abbreviations and acronyms and make editing the list easy without losing functionality like highlighting words, allowing for links (anchors) etc.
Syntax
{{Lex|<word>|<description>|<ws= ws>}}
word - Abbreviation, acronym or word that needs explanation.
description - The meaning of word (Can contain formatting, links, etc.)
ws= - Control of the white-space[1] behavior in the description field. When omitted the behavior defaults to pre-wrap (i.e. Sequences of white space are preserved. Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.).
If ws= is used without an actual value then the white-space property is not added to the style, so if no other white-space property is set, it will fallback to normal (i.e. Sequences of white space are collapsed. Newline characters in the source are handled the same as other white space. Lines are broken as necessary to fill line boxes.)
The ws parameter is of importance when using lists, either numbered(#) or unnumbered(*). if ws is not used when a list is used this results in an extra empty line between the list elements. A simple ws= is enough to fix this.
Valid values of ws are: normal, nowrap, pre, pre-line, pre-wrap, initial and inherit.
Sample
{{Lex|Word|Description}}
gives...
Word
Description
List withour the ws parameter
{{Lex|Word| # Item one # Item two}}
gives...
Word
  1. Item one
  2. Item two
List with the ws parameter
{{Lex|Word|ws=| # Item one # Item two}}
gives...
Word
  1. Item one
  2. Item two

References

  1. ^ For more information see:
    w3schools
    MDN