PricingBlog

Styling <progress> bar?

  • 0xwb-1180196747021131826

    willem

    2 years ago

    I'm attempting to style a <progress> bar element but realize the styling has to accommodate for different browsers.

    It seems I'll have to leverage pseudo-element styling that currently is not available in Toddle's style panels. Any workarounds?
    1180196747503485049-Screenshot_2023-12-01_at_11.18.39_AM.png
    1
  • 0xwb-1180197061891719269

    willem

    2 years ago

    Styling <progress> bar?
  • andreasmoller-1180199172759093341

    Andreas Møller

    2 years ago

    There are two that i can think of.
    1. You can add a style element.
    2. You can build a progress bar component
  • I would recommend number 2. I am happy to do a short video on it, but it will be Monday at the earliest
  • 0xwb-1180228616500551761

    willem

    2 years ago

    Okay thanks! I’ll try creating a component. I guess the part that stumps me is how do I dynamically set the width of the “progress” if it’s just a div in a component?
  • 0xwb-1180249778249011323

    willem

    2 years ago

    Actually nvm, was able to figure it out with the style attribute with dynamically concatinating the value for width
    ✌️1
  • andreasmoller-1180435229278736434

    Andreas Møller

    2 years ago

    Nice!
  • svenning-1180506052630954075

    svenning

    2 years ago

    Oh, nice job ✌️