Difference between revisions of "ScoreColour"
From NEC Retro
(Created page with "{{#ifexpr: {{{1}}} < 21 | background: #F80000 !important; color: #FFFFFF; | {{#ifexpr: {{{1}}} < 41 | background: #F8C500 !important; color: #000000; | {{#ifexpr: {{{1}}} < 61...") |
Ccawley2011 (talk | contribs) |
||
Line 1: | Line 1: | ||
− | {{#ifexpr: {{{1}}} < 21 | background: # | + | <includeonly>{{#ifexpr: {{{1}}} < 21 | background: #E60000 !important; color: #FFFFFF; |
| {{#ifexpr: {{{1}}} < 41 | background: #F8C500 !important; color: #000000; | | {{#ifexpr: {{{1}}} < 41 | background: #F8C500 !important; color: #000000; | ||
| {{#ifexpr: {{{1}}} < 61 | background: #F8F800 !important; color: #000000; | | {{#ifexpr: {{{1}}} < 61 | background: #F8F800 !important; color: #000000; | ||
− | | {{#ifexpr: {{{1}}} < 81 | background: # | + | | {{#ifexpr: {{{1}}} < 81 | background: #BEFF2F !important; color: #000000; |
− | | background: # | + | | background: #50F050 !important; color: #000000 !important; }}}}}}}}</includeonly><noinclude> |
+ | |||
+ | CSS for ratings. | ||
+ | <pre>{{ScoreColour|XX}}</pre> | ||
+ | |||
+ | ==Example== | ||
+ | <pre>{|class="prettytable" | ||
+ | |style="{{ScoreColour|0}}"|0 | ||
+ | |style="{{ScoreColour|25}}"|25 | ||
+ | |style="{{ScoreColour|50}}"|50 | ||
+ | |style="{{ScoreColour|75}}"|75 | ||
+ | |style="{{ScoreColour|100}}"|100 | ||
+ | |}</pre> | ||
+ | produces | ||
+ | {|class="prettytable" | ||
+ | |style="{{ScoreColour|0}}"|0 | ||
+ | |style="{{ScoreColour|25}}"|25 | ||
+ | |style="{{ScoreColour|50}}"|50 | ||
+ | |style="{{ScoreColour|75}}"|75 | ||
+ | |style="{{ScoreColour|100}}"|100 | ||
+ | |} | ||
+ | |||
+ | [[Category:NEC Retro templates]]</noinclude> |
Revision as of 16:12, 31 December 2021
CSS for ratings.
{{ScoreColour|XX}}
Example
{|class="prettytable" |style="{{ScoreColour|0}}"|0 |style="{{ScoreColour|25}}"|25 |style="{{ScoreColour|50}}"|50 |style="{{ScoreColour|75}}"|75 |style="{{ScoreColour|100}}"|100 |}
produces
0 | 25 | 50 | 75 | 100 |