Difference between revisions of "Template:Highlight Gradient"
| Line 6: | Line 6: | ||
| linear-gradient({{#if:{{{direction|}}}|{{{direction}}}|to right}}, {{For Each|{{{1}}}|/|, | | | linear-gradient({{#if:{{{direction|}}}|{{{direction}}}|to right}}, {{For Each|{{{1}}}|/|, | | ||
| template=Highlight Gradient/Step | | template=Highlight Gradient/Step | ||
| − | | param={{#expr: 100 / ({{List Size|{{{1}}}| | + | | param={{#expr: 100 / ({{List Size|{{{1}}}|/}} * 2 - 1)}} |
}}) | }}) | ||
}} | }} | ||
| transparent | | transparent | ||
}}</includeonly> | }}</includeonly> | ||
Revision as of 10:49, 25 June 2015
Generate a CSS background for the given list of colors. For an empty list, the result is "transparent"; for a single element, the result is that color; for multiple elements, the result is a gradient. The gradient includes a zone for each color followed by an equally-sized transition zone to the next color.
- First parameter: a slash-delimited (/) list of CSS colors
- direction: direction for gradient; default is "to right"