Template:TTip/doc
This is a documentation subpage for Template:TTip It contains usage information, categories and other content that is not part of the original template page. |
This page is part of Wikibooks Trainz Wikibook Administration. • It lists a template which may be useful editing Trainz. Trainz specific (special purpose) templates will be found in or under Category:Trainz Templates, which also lists/links to this Help page. |
This template 'TTip' (TrainzTip inline) is adapted from {{LeftBox}} but skips the box class statement and uses a span to wrap the text. It is meant for short tips or points.
Below, the template with typesetters test text:
- Adapted from {{TextBox}} for more user friendly style and inline notations.
- usage
- The template call is normally
{{LeftBox|'your text'}}
, where the first placeholder parameter (same as:|1= your text)
is the normal text entry mode when calling the template. - Normal mode is
{{TTip | your text goes here }}
.
- Alternatively the
1= or |2= and |3=
placeholder parameters are also active. These can be used to wrap a text element with for example, a1=<div style="background:white;">
and3=</div>
so you might use an expanded call layout for clarity:
- Alternatively the
{{LeftBox |<div style="background:white;"> or |1=<div style="background:white;"> |''your text goes here'' or |text=''your text goes here'' |</div> or |3=</div> }}
The actual pass argument evaluated is:
{{{1|}}}{{{text|{{{2|}}}}}}{{{3|}}}
- where
|text=''your text''
has precedence over the evaluation of any{{{2}}}
pass parameter.
- Pragmatic note:
In general parsing template text containing the equals sign: '=' and some other wikimarkup language operator characters (punctuation characters) need to have an explicit parameter to work properly. In such text, for example, the work around template '{{!}}' may be needed to display any pipe character ('|') needed as well, while the exclamation point works normally.
This text inside LeftBox with|small=1
using the|3='this text line'
mode.
- Pragmatic note:
Other Parameters:
- The following is the actual styling code, and parameters should be obvious
style="clear:{{{clr|{{{clear|all}}}}}}; max-width:{{{MW|1440px}}};width:{{{W|90%}}}; <!-- --> font-family:{{#if:{{{family|{{{FFAM|}}}}}}|{{{family|{{{FFAM|}}}}}}; |Garamond, Georgia, Times New Roman, Serif}};<!-- -->font-face: {{#if:{{{face|{{{FF|}}}}}}|{{{face|{{{FF|}}}}}}; |Garamond}};<!-- --> {{#if:{{{font-size|{{{FS|}}}}}}|font-size:{{{font-size|{{{FS|}}}}}}; |}}<!-- --> {{#if:{{{line-height|{{{LH|}}}}}}|line-height:{{{LH|{{{line-height|}}}}}}; |}}<!-- --> background:{{{BG|#fafafa}}}; color:{{{CO|#000000}}}<!-- -->margin:{{{M|{{{MT|5px}}} {{{MR|auto}}} {{{MB|5px}}} {{{ML|2px}}}}}}; <!-- -->padding:{{{P|{{{PT|2px}}} {{{PR|0}}} {{{PB|2px}}} {{{PL|0px}}}}}}; ">
- The parameters in order of likely formatting fiddles
- The
| BG=
option may be given to specify a different background color. - The
| W=
option may be given to adjust the width from default 90%.
- The
| MW=
option may be given to adjust the max-width from 1440px. Specify MW=auto to allow the box to go margin to margin.
- The
- The
| P=
option may be given to change the padding from 0px 25px; s.a. a more space economical 'P=0 8px 0 1.2em;
' or the like. - The
| VA=
option may be given to change HTML/CSS vertical-align:middle to bottom or top for text. The default is 'middle'.
- The
| BVA=
option may be given to change HTML/CSS vertical-align:top to middle or bottom for the entire textbox. The default is 'top' so it floats up against other elements. - See
| IVA=
option below for images vertical-alignments.
- The
- The
| clr= or |clear=
options may be given to change the clearance to left or right so to float the template beside other table elements.
- Default is 'left' so this template box will nest under any left elements
- and float beside right hand elements such as images or right margin navigation text boxes.
- Text may then flow around the elements and wrap in between Left and Right elements on a page frame. (Look at the left side of any Wikimedia page--most of the page is right floated beside it.)
- Parameters with inheritance
- The template now defaults to Serif font families, as being less often found on web pages, the contrast should emphasize your message.
'|FF='
selects a specific font face, provided your user has it on his or her browser. 'FFAM' or 'family'
can be used to change the default Font-Family declaration.'LH or 'line-height'
to scrunch lines closer and make the output more compact.
- The template now defaults to Serif font families, as being less often found on web pages, the contrast should emphasize your message.
- Individual
margin and padding parameters
are top, right, bottom, left respectively:
- Individual margin settings:
'MT', 'MR', 'MB', and 'ML'
and padding's:'PT', 'PR', 'PB', and 'PL'
respectively.
- Individual margin settings:
- Individual
- however, the definitions of
'margin' and 'M'
have precedence and setting inside parameters will be moot if either is defined.
- also, the definitions of
'padding' and 'P'
will have precedence and setting inside parameters will be moot if either is defined.
- Image options
- image (optional) : the image to be used.
- The
| size=
option may be given to override the default 25x25px size. - The
| IVA=
option may be given to change HTML/CSS vertical-align:top to middle or bottom for the image in it's leftside box. The default is 'top' so it floats up against the overall padding of the surrounding box.
- The
- See also these Trainz templates