-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Single value layout fix #4720
Single value layout fix #4720
Conversation
🦋 Changeset detectedLatest commit: 3de0504 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3de0504:
|
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.
2c69f1d
to
ad9c88f
Compare
… which results in much better sizing when used as a flex child.
c55cef0
to
1022529
Compare
@Rall3n thanks for the catch in the layout when expanded. I was working on it using a fixture to test the flex content and as such it was constantly squashed. I just reverted it before pushing. I did some more fixes to the layout/alignment as I noticed another issue too. It's much more solid now. |
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.
One last thing, but everything else looks ok.
@@ -29,11 +29,9 @@ export const placeholderCSS = < | |||
}: PlaceholderProps<Option, IsMulti, Group>): CSSObjectWithLabel => ({ | |||
label: 'placeholder', | |||
color: colors.neutral50, | |||
gridArea: '1 / 2', |
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.
D'oh! Not sure how I missed that one tbh. Should be good now. |
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.
Looks good now 👍
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.
Nice! Ha, love css grids, this is so neat now. Thanks @seancurtis
The absolute positioning pulls both the value and the placeholder out of the flow, and thus the component itself collapses down when used as a flex child. This can be solved by wrapping the component in another div, but we can solve it better by using CSS Grid instead.