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

html! macro support hyphens in attributes #199

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

chinedufn
Copy link
Owner

This commit makes it possible to use hyphenated attribute names when
creating elements using the html! macro.

For example, the following is now possible:

html! {
<svg
  xmlns="http://www.w3.org/2000/svg"
  stroke-width="1.5"
  // ...
>
  // ...
</svg>
}

Before this commit trying to add a "stroke-width" attribute would have
led to a compile time error.

This commit makes it possible to use hyphenated attribute names when
creating elements using the `html!` macro.

For example, the following is now possible:

```rust
html! {
<svg
  xmlns="http://www.w3.org/2000/svg"
  stroke-width="1.5"
  // ...
>
  // ...
</svg>
}
```

Before this commit trying to add a "stroke-width" attribute would have
led to a compile time error.
@chinedufn chinedufn merged commit 301d609 into master Jun 3, 2024
2 checks passed
@chinedufn chinedufn deleted the hyphen-in-attribute branch June 3, 2024 18:02
@chinedufn
Copy link
Owner Author

chinedufn commented Jun 3, 2024

Published

html-macro = "0.2.3"

OR

percy-dom = "0.9.7"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant