Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

njx opened this Issue Dec 8, 2012 · 4 comments


None yet
4 participants

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 commented Dec 10, 2012

Reviewed, assigned to Glenn.


peterflynn commented Dec 10, 2012

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 commented Mar 6, 2013

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


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...


@gruehle gruehle closed this May 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment