User:Evon R'al/Sandbox template/doc

From EVE University Wiki
< User:Evon R'al‎ | Sandbox template
Revision as of 12:21, 25 April 2022 by Evon R'al (talk | contribs) (Working on template {{Lex}}doc.)
Jump to: navigation, search
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