If voting checkbox input is not shown, show checkmark next to percent
Reorganize DOM and use grid layout for general poll option
Remove PollOption as an absolute bar, use PollBar::after pseudoelement
Use mix-blend-mode for attempting to get readable text color
Fix selector highlighting voted options
Reviewers should focus on:
It's hard to find settings that work well for all scenarios - probably impossible. I believe this is an improvement over the current state, though. Some scenarios have worse legibility, but this allows those that barely had any to have some.
Maybe a setting can be introduced to let forums decide whether they want to use mix-blend-mode? Since the effects mostly depend on the selected primary & secondary colors, it might be a good idea to let them turn it off if it works better without.
Screenshot
Confirmed
[x] Frontend changes: tested on a local Flarum installation.
Refs #15
Changes proposed in this pull request:
PollOption
as an absolute bar, usePollBar::after
pseudoelementmix-blend-mode
for attempting to get readable text colorReviewers should focus on: It's hard to find settings that work well for all scenarios - probably impossible. I believe this is an improvement over the current state, though. Some scenarios have worse legibility, but this allows those that barely had any to have some.
Maybe a setting can be introduced to let forums decide whether they want to use
mix-blend-mode
? Since the effects mostly depend on the selected primary & secondary colors, it might be a good idea to let them turn it off if it works better without.Screenshot
Confirmed