Skip to content

V4.beta.2 missing transition for progress-bar #24643

Closed

Description

@tmorehouse

It appears that #22703 quietly removed the default transition CSS for .progress-bar: https://github.com/twbs/bootstrap/pull/22703/files#diff-2afc93127d8c7692f4efec8bedb49bb3L22

Just wondering if this was a mistake, or intentional.

Activity

  1. added
    css
    v4
    on Nov 2, 2017
  2. gijsbotje commented on Nov 2, 2017

    @gijsbotje
    Contributor

    @andresgalante @mdo
    i could add it back on #24544

  3. andresgalante commented on Nov 2, 2017

    @andresgalante
    Collaborator

    Good catch @tmorehouse it looks like it was remove by mistake.

    @gijsbotje I'd create a new PR, try keeping that PR single purpose. Small PRs are easier to review and merge.

    @mdo just a thought: animating width is not performant, I am for removing that animation from variables or change it for animating a scale transform.

  4. gijsbotje commented on Nov 2, 2017

    @gijsbotje
    Contributor

    @andresgalante maybe your suggestion to switch to flex-basis could allow for smoother transitions

  5. tmorehouse commented on Nov 2, 2017

    @tmorehouse
    ContributorAuthor

    The main thing is to allow it to transition smoothly from say 50% to 80% (i.e. when dynamically updating the "value" of the progress bar).

  6. andresgalante commented on Nov 2, 2017

    @andresgalante
    Collaborator

    @gijsbotje flex basis will cause repaint, just like width.

    A transforms scale3d will trigger GPU acceleration and it's the smoother and most performant for this cases. It can dynamically be change with inline styles just like we do width, but we would need an extra div to do it because it'll transform the container of the number. I'll put together codepen with a demo: better show than tell 😄

  7. andresgalante commented on Nov 2, 2017

    @andresgalante
    Collaborator
  8. gijsbotje commented on Nov 3, 2017

    @gijsbotje
    Contributor

    yeah you're right, i somehow thought flex had support for gpu accelrated transition but can't find anything that says so

    using scale3d is the best option, unfortunately you'll need extra markup as you mention.
    and did you have an idea how to center that in the progress-bar?
    i can't really think of a propper way...

  9. andresgalante commented on Nov 3, 2017

    @andresgalante
    Collaborator

    @gijsbotje you are right, I can think of a way to center the value with some extra markup, but it's just too complicated and not practical enough to be in Bootstrap.

    To me the options are either remove the animation variable or add the mixin and live with a non performant animation. Since it's a simple animation it's not the end of the world, and browsers are getting better and better at it every day.

  10. added a commit that references this issue on Nov 6, 2017
    2bec39b
  11. added
    has-pr
    on Nov 6, 2017
  12. added a commit that references this issue on Nov 6, 2017
    a8aaccb
  13. added a commit that references this issue on Dec 30, 2017
    ea1c866
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    csshas-prv4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions