Module:Progression rainbow: Difference between revisions

Content deleted Content added
fix Linter flag for (nonexistent) text color in dark mode; this generally works but may cause problems, in which case revert or try specifying a different CSS value
Override the default start-class color
Line 109:
if class.count ~= 0 then
local percentage = percent(class.count, total)
-- The default start-class color is difficult to distinguish next to
-- the sub-class color, so we pick a midpoint between stub and C
if class.class ~= 'Start' then
root:newline() -- sprinkled through to make the HTML easier to read
root:tag('li')
:css('background', '#ffca66')
:css('color','inherit')
:css('width', percentage)
:attr('title', string.format('%s %s', percentage, class.category))
:tag('span')
:addClass('sr-only')
:wikitext(string.format('%s %s', percentage, class.category))
:done()
:done()
else
root:newline() -- sprinkled through to make the HTML easier to read
root:tag('li')
Line 122 ⟶ 137:
:done()
:done()
end
end
end