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

Critical CSS doesn't "extract" from the source file, leaving CSS to be loaded twice #50

Open
hdwebpros opened this issue Apr 30, 2018 · 2 comments

Comments

@hdwebpros
Copy link

Unless I'm reading into things wrong, when extracting the Critical CSS it should delete those rules from the file it grabbed them from.

Is that the intention or does that have to be solved a different way?

@bezoerb
Copy link
Owner

bezoerb commented May 4, 2018

Not exactly. The original css file remains untouched as the extraction may remove rules vital to subpages. Instead a copy of the original file with the extracted rules removed is created. The original file is swapped out by inline-critical during the inlining process.

@hdwebpros
Copy link
Author

I'm sorry, can you please explain:
"Instead a copy of the original file with the extracted rules removed is created. The original file is swapped out by inline-critical during the inlining process."

If we are loading the critical CSS on every page and comfortable extracting that CSS from the main CSS files, what can we do to achieve that?

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