Template:Clear/doc: Difference between revisions

Safer nicotine wiki Tobacco Harm Reduction
Jump to navigation Jump to search
m (1 revision imported)
imported>--WikiUser1234945--
m (Reverted edits by 174.126.250.215 (talk) (HG) (3.4.12))
 
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
<!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
{{Redirect|Template:Br|the line break template|Template:Break}}
{{high-use}}
{{#ifeq:{{FULLPAGENAME}}|Template:Clear|{{Used in system|in [[MediaWiki:Abusefilter-warning-DS]]}}|{{high-use}}}}
{{Nosubst|The markup provided will be confusing to many editors, and as this template provides documentation for itself, there is little justification for substitution.}}
{{Nosubst|The markup provided will be confusing to many editors, and as this template provides documentation for itself, there is little justification for substitution.}}
{{#ifeq:{{FULLPAGENAME}}|Template:Clear|{{Template shortcut|-|Br|Clr}}}}
{{#ifeq:{{FULLPAGENAME}}|Template:Clear|{{Template shortcut|-||Clr}}}}


== Description ==
== Description ==
Line 22: Line 21:
{{Lorem ipsum}}
{{Lorem ipsum}}


==== New section without template ====
==== New section without the template before ====
Without {{tl|clear}}, this section starts at the right of the image.
Without the code {{tlc|clear}}, this section starts at the right of the image.
{{clear}}
{{clear}}
</div>
</div>
Line 34: Line 33:
{{clear}}
{{clear}}


==== New section with template ====
==== New section with the template before ====
{{tl|clear}} placed before this section, so it appears below the image.
Here the code {{tlc|clear}} is placed before this section, so it appears below the image.
</div>
</div>


Line 47: Line 46:
"description": "Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.",
"description": "Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.",
"type": "line",
"type": "line",
"required": false
"required": false,
"suggestedvalues": [
"right",
"left",
"both"
]
}
}
},
},
Line 56: Line 60:
* {{tl|Clear left}} (implemented using this template)
* {{tl|Clear left}} (implemented using this template)
* {{tl|Clear right}} (implemented using this template)
* {{tl|Clear right}} (implemented using this template)
* {{tl|Clear2}}
* {{tl|Clear2}} (derived from this template)
* {{tl|Break}}
* {{tl|Float}}
* {{tl|Float}}
* {{tl|Stack}}
* {{tl|Stack}}

Latest revision as of 13:04, 6 April 2023


Description

This template makes content wait until existing content is completed in all columns. It is often used to prevent text from flowing next to unrelated images.

Usage

  • {{clear}} — adds <div style="clear:both;"></div>
  • {{clear|left}} — adds <div style="clear:left;"></div>
  • {{clear|right}} — adds <div style="clear:right;"></div>

For technical details, see the discussion in the talk page.

Examples

Example without {{clear}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

New section without the template before

Without the code {{clear}}, this section starts at the right of the image.

Example that uses {{clear}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


{{clear}}

New section with the template before

Here the code {{clear}} is placed before this section, so it appears below the image.

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Clear

Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images, so text will appear on a full width line under the image.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Side1

Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.

Suggested values
right left both
Lineoptional

See also