Difference between revisions of "Template:Color box"

From LFS Manual
Jump to navigationJump to search
Line 1: Line 1:
<span style="background-color: {{{1}}}{{#if:{{{3|}}}|color:{{{3}}};
+
<span style="background-color: {{{1}}}; {{#if:{{{3|}}}|color:{{{3}}};
   }}{{#if:{{{border|black}}}|border:1px solid {{{border}}};
+
   }}border: 1px solid {{{border|}}};
  }}{{#if:{{{padding|}}}|padding:{{{padding}}};}}">{{#if:{{{2|}}}
+
    {{#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><noinclude>{{documentation}}</noinclude>

Revision as of 16:58, 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}}