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

fix: Set attribute value to class #562

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

Confidenceman02
Copy link
Contributor

@Confidenceman02 Confidenceman02 commented Jan 9, 2022

fixes #563

Context

Using attribute does set the css class correctly however the attribute
name needs to be class instead of className.

Using className will set classes as classname in dom nodes and
className in svg nodes which is incorrect.

Here we can see the incorrect attribute name. On the left we should be seeing a handsome elm-select. No styles are applied.
classnames

And with correct class.
classnamefixed

Using attribute does set the css class correctly however the attribute
name needs to be class instead of className.

Using className will set classes as `classname` in dom nodes and
`className` in svg nodes which is incorrect.
@Confidenceman02
Copy link
Contributor Author

Many apologies for this oversight.

@rtfeldman
Copy link
Owner

So just to confirm, class works with both SVG and HTML nodes?

@rtfeldman rtfeldman merged commit 55b3977 into rtfeldman:master Jan 9, 2022
@rtfeldman
Copy link
Owner

Published as 17.0.4

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.

Css classes not rendering correctly
2 participants