Skip to content

Conversation

@caleb531
Copy link

@caleb531 caleb531 commented Jul 30, 2016

Hi,

I am using this plugin for my Jekyll-based personal site, and it works well for the most part. However, I've noticed a "flash of unstyled content" on my site when I reload the page before my Jekyll build finishes (which happens quite often, since this plugin seems to lengthen my build time substantially, and it's more difficult for me to intuitively guess when my build is done).

Fortunately, I found the cause of the issue by examining your source code. Recall that opening a file in 'w' mode initially erases the file. In this case, the file was being prefixed after the file was opened, meaning that the file would be empty for as long as the AutoprefixerRails.process function would take to execute. This also implies that if the AutoprefixerRails.process function raises an exception, then the file will remain empty.

As you can see, I have submitted in this PR the simple fix (which involves processing the file before opening it for writing). @imathis, please consider merging this in and drafting new release.

Thanks,
Caleb

This should eliminate the "flash of unstyled content" when
compiling Jekyll sites that use this plugin.
@caleb531
Copy link
Author

@imathis any update on getting this merged?

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

Successfully merging this pull request may close these issues.

1 participant