DioxusLabs / DioxusLabs/dioxus
Delayed CSS loading with asset system
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
When using the asset system to add CSS, the styling is loaded later than when using `Doxus.toml` and results in the components being unstyled at first.
**Steps To Reproduce**
Steps to reproduce the behavior:
- Or `style = ["/tailwind.css"]`
- Use `head::Link { rel: "stylesheet", href: asset!("./assets/tailwind.css") }`
**Expected behavior**
Everything should be styled when it appears.
**Screenshots**
Using Dioxus.toml:
https://github.com/user-attachments/assets/0156e208-826d-4b92-941e-b32acfecf32d
Using the asset system:
https://github.com/user-attachments/assets/29828eb3-24c2-43db-81ea-d53946111f38
**Environment:**
- Dioxus version: main
- Rust version: 1.80.1
- OS info: Fedora Linux 40
- App platform: web
- Browser: Firefox 129.0 (also happens sometimes with Chromium 127.0.6533.99, though not as visibly)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.