Difference between revisions of "Template:Color box"

From LFS Manual
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span style="background-color: {{{1}}}{{#if:{{{3|}}}|color:{{{3}}};
+
<includeonly><span style="display: inline-block;
   }}{{#if:{{{border|black}}}|border:1px solid {{{border}}};
+
    min-width: 1.25em;
  }}{{#if:{{{padding|}}}|padding:{{{padding}}};}}">{{#if:{{{2|}}}
+
    height: 1.25em;
 +
    line-height: 1.25;
 +
    margin: 1px 0;
 +
    text-align: center; background-color: {{{1}}}; {{#if:{{{3|}}}|color:{{{3}}};
 +
   }}border: 1px solid {{{border|}}};
 +
    {{#if:{{{padding|}}}|padding:{{{padding}}};}}">{{#if:{{{2|}}}
 
       |{{#if:{{{padding|}}}|{{{2}}}|&nbsp;{{{2}}}&nbsp;}}
 
       |{{#if:{{{padding|}}}|{{{2}}}|&nbsp;{{{2}}}&nbsp;}}
       |&nbsp;}}</span><noinclude>{{documentation}}</noinclude>
+
       |&nbsp;}}</span></includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 17:01, 5 July 2025

Template Info-Icon.png

Template documentation

View - Edit

Information icon4.png This is a documentation subpage for Template:Color box.

It may contain usage information, categories and other content that is not part of the original page.

Usage

Examples
Visual effect Markup
  {{color box|Green}}
 Default color for this text  {{color box|Yellow|Default color for this text}}
 Default color for this text  {{color box|Blue|Default color for this text}}
 Using X11 color names  {{color box|SteelBlue|'''Using X11 color names'''|Gold}}
 Using RGB hex triplets  {{color box|#012345|''Using RGB hex triplet''|#FEDCBA}}
 Red  {{color box|Yellow|Red|#f00|border=#f00}}
 bordercolor like wikitable  {{color box|white|bordercolor like wikitable|border=#A2A9B1}}