bdkjones / CodeKit

CodeKit 3 Issue Tracker
https://codekitapp.com
82 stars 5 forks source link

Refresh delay affects stylesheet injection too? #706

Closed maxwellhibbert closed 1 year ago

maxwellhibbert commented 1 year ago

I'm working with an external server (not local) where files are uploaded on save, so I have set a refresh delay, which works as expected. I'm also using the stylesheet injection so no refresh needs to occur for styles.

When I save a stylesheet, I wasn't expecting stylesheet injection to also be delayed. Is this a bug? I can't imagine it being useful to have a delay for a file that's being injected.

bdkjones commented 1 year ago

No, that's not a bug. "Injection" means that CodeKit tells the browser to reload the CSS file associated with a particular link tag, re-parse that CSS, and then repaint the viewport (without reloading the underlying HTML).

The new CSS file must be present on the server when the "injection" begins or what you'll get is a re-paint of the old CSS.

maxwellhibbert commented 1 year ago

What if I'm using Override remote CSS? If I remove the delay and save a stylesheet, the styles are injected instantly and there's no full refresh.

But then I have no delay for the template/markup...

maxwellhibbert commented 1 year ago

I've added a new issue that's more specific.