Progress bar text doesnt handle the 0% case
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 175k
- Forks
- 78.6k
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 35
Description
Prerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
If you create a progress bar where the progress is not very far (ie 0%) the inner descriptive text will not be displayed.
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">I want to be seen!</div>
</div>
This has come up before. Most recently(?) it was https://github.com/twbs/bootstrap/issues/24538 (fixed for 4.0 release).
As shown below with the test cases the issue where text will not display appears to have been introduced via 4.4.0.
Reduced test cases
This issue can be seen in the current bootstrap (5.2.3)
https://jsfiddle.net/apw74tx9/2/
I did some looking at older versions of bootstrap and this appears to have been working in 4.3.1
https://jsfiddle.net/3c6uL5hj/
But not the 4.4.0 release
https://jsfiddle.net/6pfuokv7/1/
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.2.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reduced test cases and compare the progress bar behavior in Bootstrap 4.3.1, 4.4.0, and 5.2.3. Trace the progress-bar styling responsible for hiding or clipping inner text at 0%, then verify that the descriptive text remains visible in the reported example without regressing other progress values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html, scss
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100