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

style="width: calc(${percent}% - 1px)" is not returning any value. #1014

Closed
danielwwc opened this issue Aug 8, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@danielwwc
Copy link

danielwwc commented Aug 8, 2023

Describe the bug
style="width: calc(${percent}% - 1px)" is not returning any value.

To Reproduce
Steps to reproduce the behavior:
Mount the DOM with:

<div
   class="color-red"
   :style="`width: calc(${percent}% - 1px)`"
/>

Expected behavior

<div class="color-red" style="10%"></div>

Screenshots / Output

<div class="color-red" style=""></div>

Device:

  • OS: MacOS
  • Browser Chrome
  • Version: happy-dom 10.9.0
@danielwwc danielwwc added the bug Something isn't working label Aug 8, 2023
@btea
Copy link
Contributor

btea commented Aug 15, 2023

@danielwwc Can you provide a reproduction link?

@capricorn86
Copy link
Owner

Thank you for reporting @danielwwc! 🙂

I have made a fix that adds support for "calc()" in CSS values.

You can read more about the release here:
https://github.com/capricorn86/happy-dom/releases/tag/v10.10.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants