Open pydsigner opened 1 year ago
https://docs.rs/lightningcss/1.0.0-alpha.44/lightningcss/visitor/index.html
The basis of our implementation should be a PyVisitor
struct. This will have to wrap a RustVisitor
struct that implements lightningcss::visitor::Visitor
; Visitor
itself involves lifetime parameters, which must be abstracted away from PyO3 (https://pyo3.rs/v0.19.2/class#no-lifetime-parameters).
The JavaScript bindings for lightningcss expose a powerful API for transforming CSS: https://lightningcss.dev/transforms.html. This functionality would be valuable, especially for projects like https://github.com/pydsigner/anchovy_css.