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

Respect box-sizing when determining the parent component size #87

Merged
merged 1 commit into from
Dec 30, 2022

Conversation

sangaline
Copy link
Contributor

This updates parentSizeObserver() to determine the width and height of the parent component using either box sizing or content sizing depending on the computed box-sizing of the parent. This means that the parent size will include borders and padding when the parent has a box sizing of border-box like is the case by default when the parent is a button.

Closes #86

@kmjennison
Copy link
Owner

@sangaline This looks great! Thank you for the clear issue and fix.

@kmjennison kmjennison merged commit e50ad25 into kmjennison:master Dec 30, 2022
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

Successfully merging this pull request may close these issues.

Use borderBoxSize instead of contentReact when finding parent size?
2 participants