Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it can be theoretically done, like it is mentioned in the comment above, but you would need a new block of CSS for every slider min/max/step combination. It feels it would be harder to maintain than the javascript version.


Plus it needs JS to work (the DOM's value has to be synced with the attribute value for this selector to work)


Yeah I was thinking about something similar, e.g. using attr()* and a pseudoelement to pass the value from DOM to CSS of a ::before/::after pseudo-element.

But that still feels like asking for trouble:)

Luckily I need to leave the house now, I'm feeling CSS naughty.

* IIRC support for anything besides `content:` is still very unstable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: