Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

njx opened this Issue · 4 comments

4 participants

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

@gruehle gruehle was assigned

Reviewed, assigned to Glenn.


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


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


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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.