Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4: Rewrite progress component without <progress> element #21473

Merged
merged 3 commits into from
Dec 31, 2016
Merged

Conversation

mdo
Copy link
Member

@mdo mdo commented Dec 29, 2016

This rewrites the entire .progress component to solve a number of issues with the <progress> element. <progress> elements don't allow animation, cannot have labels overlaid, don't support multiple bars, etc.

Here's what's changes:

  • Revamps CSS to use something more similar to v3's implementation. Far simpler CSS here.
  • Ditches variant mixin for .bg- utils.
  • Rebuilds docs to match, including adding a new Height section for customizing that.

Fixes #17148, fixes #18835, closes #18812, and helps with #21472.

Only potential remaining todo is adding .sr-only instances to within the bar. Unsure if that's necessary. Thoughts on that @patrickhlauke? Feel like looking at the aria labels we should be able to avoid that, but maybe not?

- <progress> element didn't allow animation, labels overlaid, multiple bars, etc.

- Revamps CSS to use something more similar to v3's implementation

- Ditches variant mixin for `bg-` utils

- Rebuilds docs to match, including adding a new Height section for customizing that.

Only potential remaining todo is adding `.sr-only` instances to within the bar. Unsure if that's necessary.
@mdo mdo added this to the v4.0.0-alpha.6 milestone Dec 29, 2016
- The `.progress-bar` requires an inline style or custom CSS to set their width.
- The `.progress-bar` also requires some `role` and `aria` attributes to make it accessible.

Put that all together, and you have the following examples.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use the width utilities w-25, w-50, w-75 and w-100 for one of the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants