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

Enhancement #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Enhancement #1

wants to merge 2 commits into from

Conversation

triasrahman
Copy link

I put 2 commits to enhance this library.

  1. Make an option to disable/enable the white space at the end.
  2. Fix the padding. Because it causes error after compiled (i.e: "- 2.5px" <-- there is a space after the minus sign).

Thank you!

@@ -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;
Copy link
Owner

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 be true by default to be backward compatible.

// 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);
padding: 2.5px 0;
Copy link
Owner

@guoyunhe guoyunhe Nov 18, 2019

Choose a reason for hiding this comment

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

Please remove this padding. It is not designed like this.

// 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);
Copy link
Owner

@guoyunhe guoyunhe Nov 18, 2019

Choose a reason for hiding this comment

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

You can define a local variable $container-margin: -1 * $space / 2; to make it easier to read. Note, this margin is same for all sides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants