-
Notifications
You must be signed in to change notification settings - Fork 28
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
Improved deck recap component layout #111
base: master
Are you sure you want to change the base?
Conversation
I'm fine with the color change, I think it's a good change. |
@@ -48,13 +48,14 @@ | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: flex-start; | |||
width: 150%; |
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.
Why this 150%?
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.
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.
I think I understand what the issue is:
- The "deck-summary" element takes the full width
- It's divided between deck-image, deck-title and best-against
- deck-image has a fixed width, best-against is set to take 100% of the space
This means that the layout itself has to figure out what's the best way to give room to each widget.
There are multiple solutions:
- Attribute width to each element so that the total is 100% (you can have a mix of pixel width + flex-grow: 1)
- Keep the sizes dynamic, using flex-basis to tell the layout the relative size of the items
In this specific case, the component's width will always be constrained by the width of the ads column, so 400px. So I'm fine with using absolute pixel sizes in this case, but the other option is fine too.
07b0da7
to
fe6d979
Compare
159c76c
to
ef452e5
Compare
Change title color to be more readable. Layout now better supports two-line strings.
Before:
After: