lhz516 / react-h5-audio-player

React audio player component with UI. It provides time indicator on both desktop and mobile devices.
https://codepen.io/lhz516/pen/dyGpmgP
MIT License
587 stars 91 forks source link

Add support for css custom properties (variables) #226

Open mysticflute opened 2 months ago

mysticflute commented 2 months ago

Thanks for creating such a great customizable package!

I was looking at the best way to customize the colors and I saw in the docs support for less/sass variables to override some styling. That sounds really useful, although not everyone is using less/sass on their projects.

CSS custom properties has good browser support, and it would be very useful to have these hooks exposed as custom properties as well. This will allow users a nice way to customize the colors even if they aren't using less/sass.

lhz516 commented 2 months ago

Sounds good, but I currently don't have bandwidth to work on this feature. I'm open to review PRs if you'd like to implement it with backwards compatibility.