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

Child panels with absolute position should not calculate parent padding with respect to width/height. #855

Closed
Jac0xb opened this issue Sep 2, 2021 · 4 comments
Assignees
Labels

Comments

@Jac0xb
Copy link

Jac0xb commented Sep 2, 2021

What can't you do?

If you have a child panel that is position aboslute and width/height 100%, it will use the padding of the parent to calculate height/width when it should just be 100% the height/width of the parent.

How would you like it to work?

It should just be 100% the height/width of the parent. This is how it works in browsers.

@Jac0xb Jac0xb added the feature label Sep 2, 2021
@Jac0xb Jac0xb changed the title Child panels with absolution position should not calculate padding with percentage width. Child panels with absolute position should not calculate padding with percentage width. Sep 2, 2021
@Jac0xb Jac0xb changed the title Child panels with absolute position should not calculate padding with percentage width. Child panels with absolute position should not calculate parent padding with respect to width. Sep 2, 2021
@Jac0xb Jac0xb changed the title Child panels with absolute position should not calculate parent padding with respect to width. Child panels with absolute position should not calculate parent padding with respect to width/height. Sep 2, 2021
@garrynewman
Copy link
Member

Is that this?

facebook/yoga#850

@Jac0xb
Copy link
Author

Jac0xb commented Sep 3, 2021

Looks about right. I forgot but left/top/right/bottom are also affected.

@Jac0xb
Copy link
Author

Jac0xb commented Sep 3, 2021

So say you want a bar at the bottom of your panel. You have to do negative bottom/left to account for padding, then you have to do some width bigger than the parent panel because you can’t get the actual width and then you have to hide overflow.

Adding something like calc(100% + 16px) could be a help too.

@Jac0xb Jac0xb closed this as completed Sep 3, 2021
@Jac0xb Jac0xb reopened this Sep 3, 2021
@handsomematt
Copy link
Member

Fixed by this PR facebook/yoga#1028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants