Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

derive a dom selector lib #32

Open
leeoniya opened this issue Jun 5, 2019 · 0 comments
Open

derive a dom selector lib #32

leeoniya opened this issue Jun 5, 2019 · 0 comments

Comments

@leeoniya
Copy link
Owner

leeoniya commented Jun 5, 2019

DropCSS already contains the vast majority of the machinery necessary to create something akin to these libs:

https://github.com/fb55/css-select
https://github.com/jquery/sizzle
https://github.com/dperini/nwmatcher

the amount of additional code/tweaks should be quite small to get this working and there's a reasonable chance that a selector engine built using DropCSS's innards would be very competative in speed and definitely size. Sizzle is 19.4KB (min) while DropCSS is 9.55KB (min) which includes an HTML parser [1] and post-processor [2] that can mostly be ditched.

[1] https://github.com/leeoniya/dropcss/blob/master/src/html.js
[2] https://github.com/leeoniya/dropcss/blob/master/src/postproc.js

@leeoniya leeoniya added enhancement New feature or request sub-project and removed enhancement New feature or request labels Jun 5, 2019
@leeoniya leeoniya changed the title create a dom selector lib derive a dom selector lib Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant