Template:Tt: Difference between revisions

From Elwiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><div data-tippy-content="x" data-tippy-placement="{{{pos|}}}" style="display: inline-block; {{#ifeq:{{{line|}}}|false||border-bottom: 1px dotted black;}} {{{style|}}}" class="tippy-btn"><span class="content">{{#if:{{{align|}}}|<div style="text-align: {{{align|}}}">}}{{{2|}}}{{#if:{{{align|}}}|</div>}}</span><div>{{{1|}}}</div></div></includeonly><noinclude>== What this is ==
<includeonly><div data-tippy-content="x" data-tippy-placement="{{{pos|}}}" style="display: inline-block; {{#ifeq:{{{line|}}}|false||border-bottom: 1px dotted black;}} {{{style|}}}" class="tippy-btn"><span class="content">{{#if:{{{align|}}}|<div style="text-align: {{{align|}}}">}}{{{2|}}}{{#if:{{{align|}}}|</div>}}</span><div>{{{1|}}}</div></div></includeonly><noinclude>
A template to write tooltips!
 
 
== Usage & Examples ==
== Usage & Examples ==
<code><nowiki>{{tt|Normal text|Tooltip text}}</nowiki></code>
<code><nowiki>{{tt|Normal text|Tooltip text}}</nowiki></code>
Line 20: Line 17:


[[Category:Code templates]][[Category:Templates]]
[[Category:Code templates]][[Category:Templates]]
</noinclude>
<templatedata>
{
"params": {
"1": {
"label": "Tooltipped element"
},
"2": {
"label": "Tooltip content",
"type": "string"
},
"pos": {
"label": "Position",
"type": "string"
},
"line": {
"label": "Line"
},
"style": {
"label": "Style"
},
"align": {
"label": "Align"
}
},
"description": "A template to spawn tooltipped content."
}
</templatedata></noinclude>

Revision as of 22:43, 10 September 2022

Usage & Examples

{{tt|Normal text|Tooltip text}}

Tooltip text
Normal text


{{tt|Normal text without underline|Tooltip text|line=false}}

Tooltip text
Normal text without underline


{{tt|Tooltip text with horizontal rule|Tooltip<hr>Text}}

Tooltip
Text
Tooltip text with horizontal rule


{{tt|{{tt|Nested tooltip|Bottom text}}|Top text}}

Top text
Bottom text
Nested tooltip


{{tt|left-aligned text|Tooltip text|text-align=left}}

Tooltip text
left-aligned text

A template to spawn tooltipped content.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Tooltipped element1

no description

Unknownoptional
Tooltip content2

no description

Stringoptional
Positionpos

no description

Stringoptional
Lineline

no description

Unknownoptional
Stylestyle

no description

Unknownoptional
Alignalign

no description

Unknownoptional