Template talk:Progression
Add topicStart filling with red when the number is negative?
[edit]Just what the subject says. :) Basically, if, say, a backlog progress bar is based on the number of pages in a category, sometimes the number might go negative as pages are added the the category. In this case, could the bar start filling up red instead of green (right now it seems like it just uses +|X|, so the bar is shows the same at -25% and 25%, for example). –Drilnoth (T/C) 18:08, 1 August 2011 (UTC)
Small text underneath
[edit]Have you considered coding the (#/#) displayed underneath this progression template at Wikipedia:WikiProject Video games (and elsewhere) into the template itself? Would save a lot of duplicate math. (not watching, please {{ping}}) czar 00:57, 25 October 2021 (UTC)
Option to set significant figures?
[edit]Is there any way to set the number of significant figures to display a more accurate progress percentage? Sanglahi86 (talk) 20:44, 29 July 2022 (UTC)
Proposed fix for template breaking when screen is less than 640px wide
[edit]I've noticed that the template breaks visually when the screen's width is less than 640 pixels (the bar's width becomes inconsistent and the green progression element becomes very small). It seems that the reason is that the below rule for formatting tables on small screens:
@media (max-width: calc(639px)) {
.mw-parser-output table {
display: block;
overflow: auto;
max-width: 100%;
}
}
This rule seems to be intended for normal tables, not tables used for visual styling such as is used in this template. I propose adding the following rule to this template's TemplateStyles CSS page:
@media (max-width: 639px) {
.progression,
.progression-bar {
display: table;
}
}
This sets the display back to being a table instead of block, fixing the issue. I have added this at this template's sandbox, and the results can be seen on the test cases page.
If there are no objections, I'll add this to the main template soon. I'm posting it here because I am not super experienced with CSS on Wikipedia and I am not sure if this is the best/correct way to fix this issue.