Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669025yFrontend is hard because every browser wants to be the "Standard" and do their own thing, rather than follow the standards outlined by the RFC spec. Sure somethings work the same and yet others don't or you need browser specific implementations.
Which leads to doing things like your progress bar, which by default is wrong, but you dont get much of a choice if you want it to work cross browser and potentially cross OS. -
What? That should work, provided you google a little. Otherwise, caniuse.com would list issues for "progress". But a polyfill for setting the colour doesn't seem legit.
-
C0D4669025y@Fast-Nop the tag is cross browser, but browsers still fuck with it.
https://css-tricks.com/html5-progre... -
<progress> is more likely "native"-ish form for every browser (that propagates its affection outside the web page), but nothing stops you from hiding it and placing a couple of unified <div>s - I saw styling frameworks doing it a lot, so no sweat :)
-
Avyy7495y@Fast-Nop It "works". But looks horrible, because browser uses its own preset color and I couldn't find a way to change that. SO failed me ðŸ˜
My serach presented me with https://css-tricks.com/html5-progre..., from where I got the idea of div+span.
If you are talking about https://github.com/LeaVerou/..., I don't think I should add a polyfill (2.5 KB) just to change a color.
Note: I am a beginner at CSS, so maybe I did something wrong(unlikely but possible) -
@C0D4 Yeah it's a bit of CSS boilerplate, but that's just copy/paste if you absolutely want to ruin the native look. A polyfill just to avoid a bit of CSS copy/paste doesn't really make sense.
-
theuser47815yIf all else fails, a possible compromise is a regular old spinner and a percentage value?
-
Root797675yBetter progress bar:
An auto playing Johnny Sins video with the volume slider set to your progress percent.
That way you know what the progress is without needing to look. Not that you could tear your eyes off @Rutee07's glory anyway. 😉
Related Rants
CSS (and all of frontend) is hard. The last few braincells left in me are slowly dying.
I just wanted a progress bar. HTML 5 supports <progress> out of the box. But all browsers want to act differently. Add more boilerplate for each browser type. Somehow got a transparent background on progress bar but it still won't let me change progress color.(Surprisingly, only IE let me change the color) At last, settled with a transparent div with a colored span inside, + js to handle value. Was this really the best way? Nope. But this was the only thing that worked,(other than importing a JS library, which would render a SVG to replicate a progressbar)
Why is front end so convoluted? Half of the things do not even make sense to me. Is this really the direction we want to go in the future?
rant
css
bad design
web technology