leeoniya / leeoniya/dropcss

derive a dom selector lib

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

sub-project
Dominant language
HTML
Stars
2.1k
Forks
64
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/html.js and src/postproc.js, the two DropCSS components identified in the issue, then compare their reusable machinery with the linked selector engines. Done means defining and implementing a standalone DOM selector library within the proposed small, size-conscious scope; no tests or specific entry point are named.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
frontend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.