-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
getContainer() delivers wrong element if element has size defined in percent #50
Comments
If the element has a percentage width, the dimension is not fixed in all cases. In the following example, the percentage width is not fixed: <div style="width: 1000px;">
<div style="float: left;">
<div style="width: 50%;">
<div>My Element</div>
</div>
</div>
</div> But with a small change (removing the <div style="width: 1000px;">
<div style="float: none;">
<div style="width: 50%;">
<div>My Element</div>
</div>
</div>
</div> So in the first case the outermost Does this explanation help? Or do you have an example code where it doesn’t work as intended? |
Hallo, What do you think? |
Yes, it's the same issue. I've fixed it a little bit different, because imported stylesheets can contain imported stylesheets again. I've just created a pull request, that - at least I think so - handles all cases and is very simple. |
Did you test the changes from 579d039 ? |
Ahh, sorry. I missed something. You are talking about the You are right, that needs to be fixed too. I close this issue in favor of your pull request #51. |
Hello, |
Great. But you can push more commits to your existing |
Hi there,
first of all: great project! Thanks!
Now my issue/question:
If the parent element has a width defined in percent, the getContainer() function returns a wrong element. If I am right, it should return the element itself, because the width has a fixed definition (isIntrinsicSize() returns false). So there should be the following check after the isFixedSize check:
Or am I wrong and the check is missing with a reason, and if yes, what reason?
Thanks, best regards, Pascal
The text was updated successfully, but these errors were encountered: