Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Message box: Difference between revisions

Template page
m Left-align licensing boxes instead of centering
m Split remaining inline CSS into /styles.css; delegate shared infobox chrome to Template:Infobox for wiki-wide visual parity
 
Line 1: Line 1:
<div class="msgbox" style="display:flex;box-sizing:border-box;align-items:center;width:auto;max-width:{{{width|90%}}};padding:.7em 1.1em;margin:0 0 1em 0;background:{{{bgcol|#f4f4f4}}};border-left:5px solid {{{linecol|#c8c8c8}}};border-radius:5px;box-shadow:0 1px 4px rgba(0,0,0,.18);">
<includeonly><templatestyles src="Template:Message box/styles.css" /><div class="loka-msgbox" style="--msgbox-width:{{{width|90%}}};--msgbox-bg:{{{bgcol|#f4f4f4}}};--msgbox-line:{{{linecol|#c8c8c8}}};"><div class="loka-msgbox-icon">[[File:{{{image|License none.png}}}|{{{imagesize|64px}}}|link=|alt=]]</div><div class="loka-msgbox-body"><div class="loka-msgbox-title">{{{title|}}}</div><div class="loka-msgbox-text">{{{text|}}}</div></div></div></includeonly><noinclude>
<div style="margin:0 1.3em 0 .3em;flex-shrink:0;">[[File:{{{image|License none.png}}}|{{{imagesize|64px}}}|link=|alt=]]</div>
<div style="width:100%;">
<div style="font-weight:700;font-size:1.08em;line-height:1.3;margin-bottom:.3em;color:#1a1a1a;">{{{title|}}}</div>
<div style="color:#3c3c3c;line-height:1.45;">{{{text|}}}</div>
</div>
</div><noinclude>
Generic styled notice box. Parameters: '''image''' (filename, no <code>File:</code> prefix), '''imagesize''', '''title''', '''text''', '''bgcol''', '''linecol''', '''width'''. Used by [[Template:License]].
Generic styled notice box. Parameters: '''image''' (filename, no <code>File:</code> prefix), '''imagesize''', '''title''', '''text''', '''bgcol''', '''linecol''', '''width'''. Used by [[Template:License]].
<code>bgcol</code>/<code>linecol</code>/<code>width</code> are set per call (each license type could in principle use different colours), so they're passed through as CSS custom properties rather than living in the stylesheet; everything else is static and lives in [[Template:Message box/styles.css]].
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 05:41, 18 August 2026

Generic styled notice box. Parameters: image (filename, no File: prefix), imagesize, title, text, bgcol, linecol, width. Used by Template:License.

bgcol/linecol/width are set per call (each license type could in principle use different colours), so they're passed through as CSS custom properties rather than living in the stylesheet; everything else is static and lives in Template:Message box/styles.css.