Difference between revisions of "Template:Tooltip"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
Line 18: Line 18:
   z-index: 1;
   z-index: 1;
   bottom: 135%;
   bottom: 135%;
   left: 0vh;
   {{#ifeq:{{#var:expand tips|right}}|right|left: 0vh;|right: 0vh;}}
}
}


Line 33: Line 33:
<noinclude>
<noinclude>
This template does the same thing as <code><nowiki><abbr></nowiki></code> tooltips, except that the tips can be viewed on mobile this time.
This template does the same thing as <code><nowiki><abbr></nowiki></code> tooltips, except that the tips can be viewed on mobile this time.
You can hide tooltips on a page with <code><nowiki>{{#vardefine:hide tips|true}}</nowiki></code>
You can make tooltips on a page expand to the left instead of the right with <code><nowiki>{{#vardefine:expand tips|left}}</nowiki></code>


==Usage==
==Usage==
Line 49: Line 53:
<pre>{{Tooltip|text1|text2|width=120px}}</pre>
<pre>{{Tooltip|text1|text2|width=120px}}</pre>
{{Tooltip|text1|text2|width=120px}}
{{Tooltip|text1|text2|width=120px}}
</noinclude>
</noinclude>

Latest revision as of 08:02, 15 November 2020


This template does the same thing as <abbr> tooltips, except that the tips can be viewed on mobile this time.

You can hide tooltips on a page with {{#vardefine:hide tips|true}}

You can make tooltips on a page expand to the left instead of the right with {{#vardefine:expand tips|left}}

Usage

{{Tooltip|text1|text2}}

text1text2

{{Tooltip|base=text1|tip=text2}}

text1text2

{{Tooltip|Nether element|[[File:Element dark.png|50px]]}}

Nether elementElement dark.png

{{Tooltip|[[File:Element dark.png|50px]]|Nether element}}

Element dark.pngNether element

{{Tooltip|text1|text2|width=120px}}

text1text2