Skip to content
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

Ability to add attributes to the Style tag in head #2875

Closed
RustGrow opened this issue Aug 21, 2024 · 0 comments · Fixed by #2888
Closed

Ability to add attributes to the Style tag in head #2875

RustGrow opened this issue Aug 21, 2024 · 0 comments · Fixed by #2888
Assignees
Labels
breaking This is a breaking change enhancement New feature or request html Related to the html crate
Milestone

Comments

@RustGrow
Copy link

RustGrow commented Aug 21, 2024

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
@ealmloff ealmloff added enhancement New feature or request html Related to the html crate labels Aug 26, 2024
@ealmloff ealmloff added this to the High-Priority Backlog milestone Aug 26, 2024
@ealmloff ealmloff added the breaking This is a breaking change label Aug 26, 2024
@ealmloff ealmloff modified the milestones: High-Priority Backlog, 0.6.0 Aug 26, 2024
@ealmloff ealmloff self-assigned this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This is a breaking change enhancement New feature or request html Related to the html crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants