Template:Composition bar: Difference between revisions

m
80 revisions imported from wikipedia:Template:Composition_bar
(Add space...)
m (80 revisions imported from wikipedia:Template:Composition_bar)
 
(40 intermediate revisions by 15 users not shown)
Line 1:
<div style="{{#ifeq:{{{width|}}}|auto||width: {{#iferror:{{#expr:{{{width|}}}}}|{{{width}}}|{{{width|100}}}px}};}}"><span class="nowrap">{{formatnum:{{{1|50}}}}} / {{formatnum:{{{2|100}}}}}{{#if:{{{per|}}}|&emsp;({{#expr:(({{{1|50}}}/{{{2|100}}})*100) round (-1*{{min|0|{{Order of magnitude|{{#expr:({{{1|50}}}/{{{2|100}}})*100}}}}}}) }}%)}}{{{ref|}}}</span><div role="img" style="{{#ifeq:{{{border|{{{border-color|}}}}}}|none||box-sizing: border-box; border: 1px solid {{{border|{{{border-color|#aaa}}}}}};}} {{#if:{{{background-color|}}}|background-color: {{{background-color}}};}} height: 1.15em; position: relative;"><div style="background-color: {{#if:{{Both|{{{4|}}}|{{{5|}}}}}
<div style="border-style: solid; border-width: 1px; border-color: #c0c0c0; background-color: #f0f0f0 ;width: {{{width|100}}}px; height: 1.5em;"><div style="position: absolute; background-color:{{#if:{{both|{{{4|}}}|{{{5|}}}}}
| |rgb({{#expr:255*{{{3|255}}}}}, {{#expr:255*{{{4|0}}}}}, {{#expr:255*{{{5|0}}}}})
| {{{hex|{{{3|#CCCCCC}}}}}}
|{{{hex|{{{3|#CCCCCC}}}}}} }}; width: {{#expr:floor({{{width|100}}}*{{{1|{{#expr:{{{width|100}}}/2}}}}}/{{{2|{{{width|100}}}}}})}}px; height: 1.5em;"></div><div style="position: absolute; font-weight: bold; width: {{{width|100}}}px; height: 1.5em; text-align: center; z-index: 10;">{{formatnum:{{{1|50}}}}}&nbsp;/&nbsp;{{formatnum:{{{2|100}}}}}{{#if:{{{per|}}}|{{Sp}}{{Sp}}{{Sp}}({{#expr:(({{{1|50}}}/{{{2|100}}})*100)round 0}}%)}}</div></div><noinclude>
}}; width: {{#expr:(({{{1|50}}}/{{{2|100}}})*100) round (-1*{{min|0|{{Order of magnitude|{{#expr:({{{1|50}}}/{{{2|100}}})*100}}}}}}) }}%; height: 100%;"></div></div></div><noinclude>
{{Documentation}}
{{Documentation}}</noinclude>