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

Try DropCSS #30

Closed
leeoniya opened this issue May 31, 2019 · 13 comments
Closed

Try DropCSS #30

leeoniya opened this issue May 31, 2019 · 13 comments

Comments

@leeoniya
Copy link
Owner

leeoniya commented May 31, 2019

Instead of spamming other libs' issues inviting people to try DropCSS, I'll just cc them here.

Try DropCSS live: https://codepen.io/leeoniya/pen/LvbRyq

@leeoniya leeoniya pinned this issue May 31, 2019
@leeoniya
Copy link
Owner Author

cc @mdickopp (via FullHuman/purgecss#195)

@zavr-1
Copy link

zavr-1 commented Jun 10, 2019

@leeoniya bro this is superb library!!! thanks so much.

@leeoniya
Copy link
Owner Author

@zavr-1 glad you like it :P

@leeoniya
Copy link
Owner Author

leeoniya commented Jul 3, 2019

cc @zachleat, @andybelldesign could be a good fit for eleventy & hylia

@leeoniya
Copy link
Owner Author

cc @mlescaudron via purifycss/purifycss#202

@leeoniya
Copy link
Owner Author

cc @lmrwork

@leeoniya
Copy link
Owner Author

cc @advanced-site-checker (via FullHuman/purgecss#211)

@leeoniya
Copy link
Owner Author

cc @lucasvazq (via FullHuman/purgecss#212)

@lucasvazq
Copy link

The youtuber spammer boy but now in github kjj

@leeoniya leeoniya unpinned this issue Jan 31, 2020
@leeoniya
Copy link
Owner Author

cc @XhmikosR, @luwes (via FullHuman/purgecss#356)

if you can manage to get everything into an html string, DropCSS will probably work well for you(s)

@luwes
Copy link

luwes commented Apr 24, 2020

@leeoniya using this config

    purgecss({
      content: ['./public/**/*.{html,js}'],
      defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
    }),

can DropCSS handle that?

@leeoniya
Copy link
Owner Author

leeoniya commented Apr 24, 2020

there's a generic shouldDrop callback, so yeah, you'd just have to glob/walk the files and build up the whitelist to test against however you need. however, you'd be missing out on a lot of dropcss's benefits by just pulling all strings out of the html files; it really shines when you let it parse the html files so it can actually properly test the selectors against the dom structure and not rely entirely on overly-zealous whitelists, which is how purgecss works (the more you add the less effective it is at purging).

@luwes
Copy link

luwes commented Apr 25, 2020

thanks, I might optimize on this later.

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

4 participants