Template:CompositionBar

From EarthMC
Revision as of 05:11, 24 July 2025 by sayerleft (talk | contribs) (Created page with "<noinclude> This template creates a single horizontal bar that visually represents a percentage or value relative to a total, similar to how the Wikipedia `Template:Composition_bar` can be used for a single metric. ```wiki {{#tag:syntaxhighlight| <div class="composition-bar-wrapper" style=" {{#if:{{{width|}}}|width:{{{width}}};|width:100px;}} {{#if:{{{float|}}}|float:{{{float}}};}} margin-left:auto; margin-right:0; →‎Default align right: border:{{{5|{{{border...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This template creates a single horizontal bar that visually represents a percentage or value relative to a total, similar to how the Wikipedia `Template:Composition_bar` can be used for a single metric.

```wiki {{#tag:syntaxhighlight|

 <div class="composition-bar-fill" style="
   width:Expression error: Unrecognized punctuation character "{".%;
   background-color:#4CAF50;
   color:white;
 ">
   
     Expression error: Unrecognized punctuation character "{".%
   

Example: