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...") |
m (Text replacement - "Category:NEC Retro templates" to "Category:Templates") |
||
(One intermediate revision by one other user not shown) | |||
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:Templates]]</noinclude> |
Latest revision as of 12:37, 1 January 2022
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 |