Template:Outdent/doc: Difference between revisions

Overthink (talk | contribs)
create doc page
 
Overthink (talk | contribs)
direct to wikipedia instead
Tag: Replaced
 
Line 3: Line 3:
Use this template on talk pages to reply to a message without indenting, when a chain of replies goes too deep.
Use this template on talk pages to reply to a message without indenting, when a chain of replies goes too deep.


== Parameters ==
For further details, see the template page on Wikipedia.
 
;{{para|1|<var>indent</var>}}
: Supports two modes: literal indentation or an integer. In literal indentation mode the value may contain <code>:</code> (indents), <code>*</code> (unnumbered list), and <code>#</code> (numbered list). It is recommended to copy the colons, asterisks, and hashes from the start of the previous message. In integer mode, the value is interpreted as number of indents (<code>:</code>). Default value is <code>10</code>. Supported range is from -40 to 40. A negative integer is the same as positive integer with {{para|reverse|y}}.
;{{para|2|y}}
: Set it to add a link to [[Wikipedia:Indentation#Outdenting]]. {{tlx|od|5|y}} produces:
{{od|5|y}}
;{{para|r|y}} (aliases {{para|reverse|y}}, {{para|indent|y}}, {{para|in|y}})
:Reverses the outdentation to become indentation and vice versa.
 
==Examples==
===With indentation wikitext===
<div style="border:thin navy solid; padding:8px; margin:4px">
<syntaxhighlight lang="wikitext">::::Previous post, indented with four colons.
{{Outdent|::::}} New post.</syntaxhighlight>
 
''displays as''
 
::::Previous post, indented with four colons.
{{Outdent|::::}} New post.
</div>
 
=== Positive integer ===
<div style="border:thin navy solid; padding:8px; margin:4px">
<syntaxhighlight lang="wikitext">::::::Previous post, indented 6 levels.
{{Outdent|6}} New post.</syntaxhighlight>
 
''displays as''
 
::::::Previous post, indented 6 levels.
{{Outdent|6}} New post.
</div>
 
=== With separate indent ===
 
To not outdent all the way to the left margin, indent the {{tl|outdent}} template itself using colons:
<div style="border:thin navy solid; padding:8px; margin:4px">
<syntaxhighlight lang="wikitext">::::::Previous post, indented 6 levels.
::{{Outdent|4}} New post.</syntaxhighlight>
 
''displays as''
 
::::::Previous post, indented 6 levels.
::{{Outdent|4}} New post.
</div>
 
=== Indent ===
<div style="border:thin navy solid; padding:8px; margin:4px">
Using {{para|reverse|y}}:
<syntaxhighlight lang="wikitext">::::::Previous post, indented 6 levels.
::{{Outdent|4}} Start of a new post indented 2 levels using a bar of length 6−2=4.
::{{Outdent|5|reverse=yes}}
:::::::Indent to indentation level 7 using a reversed bar of length 7−2=5.</syntaxhighlight>
 
''displays as''
 
::::::Previous post, indented 6 levels.
::{{Outdent|4}} Start of a new post indented 2 levels using a bar of length 6−2=4.
::{{Outdent|5|reverse=yes}}
:::::::Indent to indentation level 7 using a reversed bar of length 7−2=5.
</div>
 
Or with a negative integer:
<div style="border:thin navy solid; padding:8px; margin:4px">
<syntaxhighlight lang="wikitext">
::::::Original conversation.
::::::{{od|-3}}
:::::::::Afterthought.
:::::::{{od|2}}
:::::::Continuation of original conversation.</syntaxhighlight>
 
''displays as''
 
::::::Original conversation.
::::::{{od|-3}}
:::::::::Afterthought.
:::::::{{od|2}}
:::::::Continuation of original conversation.
</div>
 
== CSS and hide ==
This template is contained in the CSS class "outdent-template". Users who would prefer not to see the template can add the following line to their custom CSS ([[Special:MyPage/common.css]]):
 
<syntaxhighlight lang="css">
.outdent-template { display: none; }
</syntaxhighlight>