purescript-web/purescript-web-dom

querySelector css selector constructor

Closed this issue · 2 comments

It would be really awesome to use the CSS.Selector.Predicate instead of the QuerySelector because it has better composition.

garyb commented

That's probably not going to happen since the CSS library is opinionated, and the goal of the purescript-web projects is to provide an as-unopinionated-as-is-reasonable, low level interface to the browser APIs.

I'd say the current situation has better compositional properties, because you can either use CSS or not, and to make it work you just insert a call to render the CSS when setting relevant properties 😉

Understandable, thanks.