Template:Legend: Difference between revisions
From MicrasWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><div class="legend"><span class="legend-color" style="display:inline-block; width:1.5em; height:1.5em; margin:1px 0; border:{{{border|1px solid {{{outline|black}}}}}}; background-color:{{trim|{{{1|transparent}}}}}; color:{{{textcolor|black}}}; font-size:{{{size|100%}}}; text-align:center;">{{#if:{{{text|}}}|<span class="legend-text" style="font-size:95%;">{{{text}}}</span>| }}</span> {{{2|}}}</div></includeonly><noinclude> | {{#switch:{{class|}} | ||
|#default=<includeonly><div class="legend"><span class="legend-color" style="display:inline-block; width:1.5em; height:1.5em; margin:1px 0; border:{{{border|1px solid {{{outline|black}}}}}}; background-color:{{trim|{{{1|transparent}}}}}; color:{{{textcolor|black}}}; font-size:{{{size|100%}}}; text-align:center;">{{#if:{{{text|}}}|<span class="legend-text" style="font-size:95%;">{{{text}}}</span>| }}</span> {{{2|}}}</div></includeonly><noinclude> | |||
|inline=<includeonly><!-- | |||
--><templatestyles src="Legend/styles.css" /><!-- | |||
--><span class="legend nowrap"><!-- | |||
--><span class="legend-color {{#if:{{{invert|}}}|skin-invert|mw-no-invert}}" style="forced-color-adjust: none; <!-- | |||
-->{{#if:{{{border|}}}|border: {{{border}}};|{{#if:{{{outline|}}}|border: 1px solid {{{outline}}};}}}}<!-- | |||
-->{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|white|black|css=y}}}}<!-- | |||
-->{{#if:{{{textcolor|}}}|color:{{{textcolor}}};}}<!-- | |||
-->{{#if:{{{size|}}}|font-size:{{{size}}};}}"><!-- | |||
-->{{#if:{{{text|}}}{{{alt|}}} | |||
| <span class="legend-text" style="{{#if:{{{alt|}}}|color:{{{1|}}};}}font-family: monospace, monospace;">{{If empty|{{{alt|}}}|{{Encodefirst|{{{text|}}}}}| }}</span>| }}<!-- | |||
--></span><!-- | |||
--> {{{2|}}}<!-- | |||
--></span><!-- | |||
--></includeonly><noinclude> | |||
}} | |||
{{Documentation}} | {{Documentation}} | ||
</noinclude><noinclude>[[Category: Diagram templates]]</noinclude> | </noinclude><noinclude>[[Category: Diagram templates]]</noinclude> | ||
Revision as of 04:30, 30 April 2026
[create]
Template documentation
| Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |