fasthtml
fasthtml copied to clipboard
Live Reload is not loading custom style in header
Important Notice We do not provide support through GitHub issues. For community-based help, please use either:
- GitHub Discussions tab
- Our Discord channel
If you're reporting a bug, please continue with this template.
Describe the bug A clear and concise description of what the bug is.
Minimal Reproducible Example Provide a minimal code snippet that reproduces the issue. This is crucial for us to understand and fix the bug quickly.
# Your code here
Expected behavior this line, kwargs["hdrs"] = [*(kwargs.get("hdrs") or []), self.LIVE_RELOAD_HEADER], in live_reload.py is not putting the custom style defined with fast_app() in the header section.
For example: css = Style('h2 {color: red;}') app, rt = fast_app(pico=True,hdrs=(css), live=True)
is putting the CSS as well as the injected reload codes in the body of the page.
Environment Information Please provide the following version information:
- fastlite version:
- fastcore version:
- fasthtml version: version = "0.6.9" from .core import *
Confirmation Please confirm the following:
- [ ] I have read the FAQ (https://docs.fastht.ml/explains/faq.html)
- [ ] I have provided a minimal reproducible example
- [ ] I have included the versions of fastlite, fastcore, and fasthtml
- [ ] I understand that this is a volunteer open source project with no commercial support.
Additional context Add any other context about the problem here.
Screenshots If applicable, add screenshots to help explain your problem.