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

Support undoing CSS transforms when measuring dimensions #396

Open
vovayatsyuk opened this issue Feb 22, 2022 · 1 comment
Open

Support undoing CSS transforms when measuring dimensions #396

vovayatsyuk opened this issue Feb 22, 2022 · 1 comment

Comments

@vovayatsyuk
Copy link
Contributor

Current behavior

The following code decreases actual dimensions of the element if the parent element uses transform property:

$('.el').height($('.el').height() + 5);

Expected behavior

The element should increase its height.

Codepen

https://codepen.io/vovayatsyuk/pen/qBVYQJJ

Proposed solution

Add a notice to the migration guide to use .css('height') instead?

@fabiospampinato
Copy link
Owner

When reading the height the eventual transform property is not kind of undone, this is mentioned in the migration guide.

So in some sense it is working as expected.

If this is implementable with little code though it might be a nice to have feature 🤔

Add a notice to the migration guide to use .css('height') instead?

Done, thanks 👍

@fabiospampinato fabiospampinato changed the title Increment element height when element uses transform leads to unpreditable results Support undoing CSS transforms when measuring dimensions Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants