Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Creating new stylesheet while in Live Preview doesn't refresh #2311

Closed
njx opened this issue Dec 8, 2012 · 4 comments
Closed

Creating new stylesheet while in Live Preview doesn't refresh #2311

njx opened this issue Dec 8, 2012 · 4 comments
Assignees

Comments

@njx
Copy link
Member

njx commented Dec 8, 2012

  1. In an HTML file, add a link to a nonexistent stylesheet (e.g. <link rel="stylesheet" href="styles.css">)
  2. Turn on Live Preview
  3. Create a styles.css file in the project
  4. In the new file, type body { background: #f00; }

Result: Style isn't previewed in the browser. This is probably because Chrome didn't load the stylesheet on the initial load, so we never got the callback for it. We could work around this in a few ways--e.g. if saving an (apparently) unreferenced stylesheet, refresh the browser the same way we do for non-CSS files.

@ghost ghost assigned gruehle Dec 10, 2012
@pthiess
Copy link
Contributor

pthiess commented Dec 10, 2012

Reviewed, assigned to Glenn.

@peterflynn
Copy link
Member

Seems like we might want to do the refresh earlier, when the file is initially created. Otherwise the user creates the file and starts typing a rule... and no updating occurs, so it still seems broken (it would not start working until they hit Save for the first time).

@pthiess
Copy link
Contributor

pthiess commented Mar 6, 2013

Reviewed again, there seem easy enough and intuitive workaround (reload in the browser or reconnecting) - changing priority to low.

@gruehle
Copy link
Member

gruehle commented May 14, 2013

This works in the latest build of Brackets. I'm not sure what fixed it--could be a new Chrome, could be the node server, could be something else...

Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants