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

Issues with PurgeCSS being over zealous in it's purging :) #246

Open
readingdancer opened this issue Jun 29, 2020 · 3 comments
Open

Issues with PurgeCSS being over zealous in it's purging :) #246

readingdancer opened this issue Jun 29, 2020 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers Up for grabs Anyone can offer to take on these tickets
Milestone

Comments

@readingdancer
Copy link
Contributor

Describe the bug

I have added a package called PurgeCSS to the build process to reduce the amount of unused CSS so that it improves the page load and the Google speed score.

However, currently it is purging some CSS that it shouldn't be, so I think we probably just need to whitelist some dynamic class names, the white list can be found in the vue.config.js file.

Full details about PurgeCSS can be found on it's website here:

https://purgecss.com/guides/vue.html#use-the-vue-cli-plugin

The branch where I have made these changes is here:

https://github.com/code-for-chapel-hill/NC-COVID-Support/tree/adding-purgecss

To Reproduce
Steps to reproduce the behavior:

Checkout the above branch and run it locally ( I assume you already have the solution working and know how to run it, if not, check out our main help pages )

Expected behavior

The site looks identical to the current live site, same spacing / fonts / colors etc.

Screenshots

Annotation 2020-06-29 112759

@readingdancer readingdancer added bug Something isn't working good first issue Good for newcomers Up for grabs Anyone can offer to take on these tickets labels Jun 29, 2020
@readingdancer readingdancer added this to the Version 1.3 milestone Jun 29, 2020
@eparadise
Copy link
Contributor

I'll try this!

@readingdancer
Copy link
Contributor Author

@joonyoungleeduke - If you fancy doing some investigation into this issue, it would be great to have this one fixed.

@aevix
Copy link

aevix commented Aug 19, 2020

I added some more items in whitelist and it seems to have fixed most of the issues but I can't seem to figure out why the fonts are different. Maybe its just not loading locally.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Up for grabs Anyone can offer to take on these tickets
Projects
None yet
Development

No branches or pull requests

3 participants