-
Notifications
You must be signed in to change notification settings - Fork 767
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
Expanding fr #2221
Expanding fr #2221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to using the new mechanism to handle fr units!
def is_relative_height(self) -> bool: | ||
"""Does the node have a relative width?""" | ||
height = self.height | ||
return height is not None and height.unit in (Unit.FRACTION, Unit.PERCENT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't w
, h
, vh
, and vw
, relative units too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w
and h
become percent units.
vh
and vw
aren't relative to the container, unless the container happens to be screen. Maybe the name could be clarified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A clarification is always welcome, in my opinion.
Expand "auto" container if any child has a relative dimension (
fr
or%
).Fix margins not being respected when containers have auto dimensions.
Fixes #2220