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

Inline style issue with variable on return #60

Closed
mucahitgurbuz opened this issue Jan 19, 2019 · 2 comments
Closed

Inline style issue with variable on return #60

mucahitgurbuz opened this issue Jan 19, 2019 · 2 comments

Comments

@mucahitgurbuz
Copy link

mucahitgurbuz commented Jan 19, 2019

There is a render issue(might be related with hyperscript) when you want to give style attribute with variable;
<div class="competency-level" style="width: ${this.state.percentage};" title="Percentage"></div>
In this case, width is not rendered inside the style attribute.

However, when you give the style with an object;
<div class="competency-level" style="${{ width: this.state.percentage + '%' }};" title="Percentage"></div>
the problem is gone.

@developit
Copy link
Owner

This is a duplicate of #58. We'll need to decide if this is something we want to support since, as you noted, there is a workaround and the current state is aligned with JSX.

@developit
Copy link
Owner

This was fixed in HTM 2.2 🎈

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

No branches or pull requests

2 participants