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

Divide with padding? #20

Closed
xdividr opened this issue Jun 4, 2014 · 15 comments
Closed

Divide with padding? #20

xdividr opened this issue Jun 4, 2014 · 15 comments

Comments

@xdividr
Copy link

@xdividr xdividr commented Jun 4, 2014

Loving this extension!

Here's a task I run into constantly. It would be nice to have the option to add padding between divisions, with an identical wrap around the border. Like so:

screenshot 2014-06-04 09 47 43

5 divisions, 20px padding between each. Just another thing that would make the day go faster.

@AriaMinaei
Copy link
Owner

@AriaMinaei AriaMinaei commented Jun 4, 2014

That's a great idea!

We could have Divide act like Griddify when supplied with multiple numbers. For example:

2 10:
image
2 10 10:
image
2 20 10 20:
image

So basically, the first number determines the number of divisions, and if a second number isn't present, it'll just add a guide at each division position. But if there are one or more additional numbers present, it'll turn those into "gutters" and then makes sure their center matches the division's center.

What do you think?

@xdividr
Copy link
Author

@xdividr xdividr commented Jun 4, 2014

My thought exactly. I actually at first tried typing 5 20 into Divisions fully expecting this to happen.

I'm now thinking it might be a good idea (and more intuitive) to create the actual guide inside the gutter, not just the gutter lines themselves.

For your examples, shouldn't that be 2 10, 2 10 10, etc?

@AriaMinaei
Copy link
Owner

@AriaMinaei AriaMinaei commented Jun 4, 2014

create the actual guide inside the gutter, not just the gutter lines themselves.

You lost me :) Can you explain a bit more?

@xdividr
Copy link
Author

@xdividr xdividr commented Jun 4, 2014

OK, sorry :)

5 20:

screenshot 2014-06-04 11 53 09

(Division guides centered inside the gutters.)

@AriaMinaei
Copy link
Owner

@AriaMinaei AriaMinaei commented Jun 4, 2014

Great! I'll come back to this :)

@justo
Copy link

@justo justo commented Jun 10, 2014

I'd just like to also request this feature. I really like the plugin but without an easy way to create gutters on a divided grid (eg 12 20) I don't have too much use for it.

Thanks!

@AriaMinaei
Copy link
Owner

@AriaMinaei AriaMinaei commented Jun 11, 2014

@justo Yeah this is pretty important. I'm working on it :)

@xdividr I was just writing the code for this feature, and I wanted to ask your opinion again about where to put these guides. Your idea about putting division guides inside the gutters looks simple enough, but it can't achieve the system you show in the first comment:
image

So, wouldn't writing 50 10 10 instead of 5 20 make it more flexible?

@xdividr
Copy link
Author

@xdividr xdividr commented Jun 11, 2014

Agreed, for max flexibility, it probably makes the most sense to do as you're suggesting: 5 10 10

Referring to the grid in my first comment, I now realize there are actually 3 things going on:

  1. 20px wrap on all sides
  2. 5 grid divisions
  3. 20px gutters at each division (or, as you suggest, 10px margins on either side of each division guide)

With the current version, you can easily do both 1. and 2. So to accomplish my example, I'm thinking you could:

  1. Wrap 20
  2. Select the area inside the wrap
  3. Divide 5 10 10

Does this make sense? Happy to clarify.

AriaMinaei added a commit that referenced this issue Jun 11, 2014
@AriaMinaei
Copy link
Owner

@AriaMinaei AriaMinaei commented Jun 11, 2014

I just realized I wrote the wrong example.

Anyway, I just packaged a new temporary release for this feature. Can you give it a try and see if it fits the needs you described?

@xdividr
Copy link
Author

@xdividr xdividr commented Jun 11, 2014

This works perfectly. Thank you!

@xdividr xdividr closed this Jun 11, 2014
@xdividr
Copy link
Author

@xdividr xdividr commented Jun 11, 2014

For reference, here are the exact steps to recreate my example:

  1. Wrap 10 10
  2. Select the area 10px inside outer margins
  3. Divide 5 10 10

screenshot 2014-06-11 10 47 14

@AriaMinaei
Copy link
Owner

@AriaMinaei AriaMinaei commented Jun 11, 2014

Awesome! Thank you very much for helping me with your time and ideas :)

@xdividr
Copy link
Author

@xdividr xdividr commented Jun 11, 2014

Shucks. Thank you for saving me hours of dragging / setting guides!

@AriaMinaei
Copy link
Owner

@AriaMinaei AriaMinaei commented Jun 11, 2014

@xdividr It's my pleasure.

Pinging @justo: Take a look at the new version :)

@justo
Copy link

@justo justo commented Jun 11, 2014

@AriaMinaei The new version works perfectly, thank you!

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.