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
ConstrainedAspectRatio element #23
Conversation
da6eb09
to
076b8d9
Compare
@@ -0,0 +1,77 @@ | |||
/// Constrains the size of the content element to an aspect ratio. | |||
public struct ConstrainedAspectRatio: Element { |
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.
Non-blocking: Don't love this name but don't have a better suggestion right now.
public struct ConstrainedAspectRatio: Element { | ||
/// Represents whether the content element's size should be expanded to fill its parent | ||
/// or shrunk to fit it. | ||
public enum ContentMode { |
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.
Doesnt matter within Blueprint, but I tend to make these enums equatable when I can.
076b8d9
to
09e1463
Compare
A new
ConstrainedAspectRatio
element that constrains the size of its child to — you guessed it — an aspect ratio.You can choose to enforce this constraint by expanding or shrinking the child. Open to alternative suggestions for the name of "expand or shrink" behavior.