Skip to content

Linked stylesheets should auto-refresh on edit #415

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mbostock opened this issue Dec 21, 2023 · 1 comment
Closed

Linked stylesheets should auto-refresh on edit #415

mbostock opened this issue Dec 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

If you have

<link rel="stylesheet" type="text/css" href="test.css">

then if you edit test.css, we want the page to update. This means:

  1. We need to detect test.css as a file and watch it (which should already be happening in normalizePieceHtml, but doesn’t appear to be working as intended for some reason), and
  2. We need to rewrite the href attribute to include the content hash, so that when the linked file changes, the browser will pick up the new file as intended.
@mbostock
Copy link
Member Author

mbostock commented Mar 1, 2024

Fixed in #843.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants