-
Notifications
You must be signed in to change notification settings - Fork 4
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
Enhancement #1
base: master
Are you sure you want to change the base?
Enhancement #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,21 +10,26 @@ $flexbin-phone-max: 400px !default; | |
$flexbin-row-height-phone: 100px !default; | ||
$flexbin-space-phone: $flexbin-space !default; | ||
|
||
$flexbin-add-end-space: false; | ||
|
||
// Minxin for customize multiple Flexbin layout | ||
// For example, 300px height for desktop devices, 150px height for mobile devices | ||
@mixin flexbin($row-height, $space) { | ||
display: flex; | ||
overflow: hidden; | ||
flex-wrap: wrap; | ||
margin: - $space / 2; | ||
margin: 0 (-1 * $space / 2); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can define a local variable |
||
padding: 2.5px 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove this padding. It is not designed like this. |
||
|
||
// Let final row align left fit if images are not enough to fill | ||
// If the gap is very small, fill the final row | ||
&:after { | ||
content: ''; | ||
flex-grow: 999999999; // avoid final row zoom too much to fit width | ||
min-width: $row-height; // avoid small gap in final row (< $row-height) | ||
height: 0; | ||
@if $flexbin-add-end-space { | ||
&:after { | ||
content: ''; | ||
flex-grow: 999999999; // avoid final row zoom too much to fit width | ||
min-width: $row-height; // avoid small gap in final row (< $row-height) | ||
height: 0; | ||
} | ||
} | ||
|
||
> * { | ||
|
@@ -66,5 +71,3 @@ $flexbin-space-phone: $flexbin-space !default; | |
@include flexbin($flexbin-row-height-phone, $flexbin-space-phone); | ||
} | ||
} | ||
|
||
|
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.
Every parameter should be optional, with
!default
. This option should betrue
by default to be backward compatible.