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

fix better positioning and stacking of logos of even amount #369

Merged
merged 3 commits into from
Feb 11, 2020

Conversation

Maxxen
Copy link
Contributor

@Maxxen Maxxen commented Feb 4, 2020

Description of the Change

This change makes the logo block use flexbox to scale, position and wrap around logos properly.

Previously, if less than 3 logos were present, an empty fake column was inserted to offset the row and make them look somewhat centered. This didn't work as intended when there was only one logo present, since it was just offset from already being centered thanks to the fake column. Now logos instead flex to fit the remaining space, and wrap to a new row once a row contains more than 3 logos, thanks to flex-basis: 33% (this is consistent with the current behaviour, but max row size could easily be changed by modifying flex basis). A breakpoint for small screens is also set which triggers the logos to arrange themselves in a column instead of rows.

Applicable Issues

None

@Maxxen
Copy link
Contributor Author

Maxxen commented Feb 4, 2020

flex

Examples of new improved behavior for 4, 2, and 8 logos

@Maxxen Maxxen changed the title fix better positioning and stacking of logos when in high and uneven … fix better positioning and stacking of logos of even amount Feb 4, 2020
Copy link
Member

@dakaza98 dakaza98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change!

src/blocks/templates/blocks/logos.html Outdated Show resolved Hide resolved
@Maxxen Maxxen requested a review from dakaza98 February 7, 2020 15:04
@dakaza98 dakaza98 merged commit feb1691 into development Feb 11, 2020
@dakaza98 dakaza98 deleted the fix-logo-positoning branch February 11, 2020 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants