Jump to content

Template:Messagebox: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
m adjust left-cell width based on icon size
revert test
 
(27 intermediate revisions by 15 users not shown)
Line 1: Line 1:
<templatestyles src="Template:Messagebox/styles.css" />
{| style="border:1px solid #AAA; background:#f9f9f9; width:100%; margin:0 auto 1em auto; padding:.2em; text-align:justify;{{{extra|}}}"
{| role="presentation" class="tpl-messagebox" {{#if: {{{uselang|{{{lang|}}}}}} | lang="{{{uselang|{{{lang|}}}}}}" }} {{#if: {{{dir|}}}{{{uselang|{{{lang|}}}}}} | dir="{{{dir|{{#dir:{{{uselang|{{{lang|}}}}}}}}}}}" }} style="width:{{{box-width|100%}}};{{{extra|}}}"
|style="width:{{{l-width|{{{icon-size|50px}}};}}}"| {{{image|[[Image:Symbol comment vote.svg|{{{icon-size|50px}}}]]}}}
|-
|style="padding-left:.2em;"| {{{text|{{{1|Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.}}}}}}
|style="width:{{{l-width|{{{icon-size|50px}}}}}}"|{{{image|[[Image:Symbol comment vote.svg|{{{icon-size|50px}}}]]}}}
|}<noinclude>[[Category:Templates|Messagebox]]</noinclude>
|| {{#if: {{{uselang|{{{lang|}}}}}} | <b class="tpl-messagebox-langtag" lang="{{#bcp47:{{Pagelang}}}}" dir="{{#dir:{{Pagelang}}}}">({{#language:{{{uselang|{{{lang|{{Pagelang}}}}}}}}|{{Pagelang}}}})&nbsp;</b> }}{{{1|{{{text<noinclude>|{{Lorem ipsum}}</noinclude>}}}}}}
|}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 22:17, 11 July 2025

Template documentation
Usage
Parameters
  • box-width (optional): default is 100% for the container box.
  • extra (optional): extra styles for the container box.
  • lang (optional): if set to a valid IETF language code, overrides the default language of the content (useful to allow the web renderer to select the appropriate font and linguistic features).
  • dir (optional): if set to ltr or rtl, overrides the default directionality of the content (which side for the icon, start margin and direction for the text).
  • image (optional): default is [[Image:Symbol comment vote.svg]] (with the specified icon width).
    • icon-size or l-width: default is 50px for the icon width.
  • text or 1 (mandatory): the text to display.

See also