dioxus
dioxus copied to clipboard
Ability to add attributes to the Style tag in head
Problem
head::Style {} has body. There is also a need to add the ability to specify attributes inside the tag, as in the example below.
r#type: "text/tailwindcss"
Example:
https://tailwindcss.com/docs/installation/play-cdn
3 Try adding some custom CSS
<style type="text/tailwindcss">
@layer utilities {
.content-auto {
content-visibility: auto;
}
}
</style>
Steps to reproduce the behavior:
cargo install --git https://github.com/dioxuslabs/dioxus dioxus-cli --locked
dx --version
dioxus 0.6.0-alpha.2 (3c699aa)
[dependencies]
dioxus = { git = "https://github.com/DioxusLabs/dioxus", features = ["web", "router"] }
dioxus-logger = "0.5.1"
Expected behavior
The custom CSS that supports all of Tailwind's CSS features should be properly loaded and applied to the page into the head section.
Environment:
- Dioxus version: 0.6.0-alpha.2
- Rust version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)
- OS info: Windows 11 Pro, 23H2, 22631.4037
- App platform: web