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

js: minimise arguments passed to querySelector/querySelectorAll #785

Open
jvoisin opened this issue Dec 16, 2024 · 2 comments
Open

js: minimise arguments passed to querySelector/querySelectorAll #785

jvoisin opened this issue Dec 16, 2024 · 2 comments

Comments

@jvoisin
Copy link

jvoisin commented Dec 16, 2024

querySelector/querySelectorAll) take a css selector as parameter, and minify already has code to minify those, so it would be nice to wire it there.

This:

e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not( [tabindex="-1"] )')

could be minified as this:

e.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')
@tdewolff
Copy link
Owner

Hi Julien, you make excellent suggestions for improvement of the minifiers. Unfortunately I don't have a lot of time lately to work on those. In fact, I believe an improved CSS parser and minifier would be necessary. I've put your issues on my to-do list but this may happen somewhere next year...

@jvoisin
Copy link
Author

jvoisin commented Dec 16, 2024

It's ok, it's best-effort open-source software, please don't apologize for not having time to put in it! Minify is already great and super-useful, thank you for making it <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants