purescript-web / purescript-web-cssom

Type definitions and low level interface implementations for the CSS Object Model
MIT License
9 stars 4 forks source link

cssom vs cssom-view #9

Open garyb opened 3 years ago

garyb commented 3 years ago

It recently came to my attention that there are two very similar named specs, and we have a mixture of both in here 🤦‍♂️. We could just say that this library covers both of them... but they do kinda have separate concerns:

https://www.w3.org/TR/cssom-1/

CSSOM defines APIs (including generic parsing and serialization rules) for Media Queries, Selectors, and of course CSS itself.

https://www.w3.org/TR/cssom-view-1/

The APIs introduced by this specification provide authors with a way to inspect and manipulate the visual view of a document. This includes getting the position of element layout boxes, obtaining the width of the viewport through script, and also scrolling an element.

thomashoneyman commented 3 years ago

I think the most sensible thing is to have two libraries, and I think it's sensible to do it now, given that we'd be shuffling some definitions among packages as part of that change and we're already in the midst of making breaking changes for 0.14. @keijokapp has some initial work on a cssom-view specific package here:

https://github.com/keijokapp/purescript-web-cssom-view

garyb commented 3 years ago

Yeah, I just saw the other conversation that mentioned that, right as you replied!