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

Be able to use percentages % of remaning space when setting flexibility #15

Open
Jeremy-Knudsen opened this issue Aug 18, 2016 · 3 comments

Comments

@Jeremy-Knudsen
Copy link

If I have two spacers within a BlokGroup, I'd like to be able to specifically set how much each spacer should flex (e.g. 33% and 67% remaining space).

@WestonThayer
Copy link
Owner

WestonThayer commented Aug 18, 2016

The flexibility property maps to CSS's flex-grow, so I think you can do this with a flexibility value of 1 for the first item and 2 for the second item.

Edit: or is your feedback more that the 1 and 2 values are confusing, and percentages would be more intuitive?

@Jeremy-Knudsen
Copy link
Author

Jeremy-Knudsen commented Aug 19, 2016

Yes, it's confusing but perhaps the reason why is because:

  1. the help tooltip comes across as if there are only 3 options to choose from--1, 2, and unset--which made me think a radio button group would be a better UI for this if those were the only three options. But what I think you are saying is that this actually maps to the flex-grow parameter which can be any number really. Is that right?

  2. I did not know that the flexibility parameter in Bloks maps one-to-one with CSS's "flex-grow" attribute. If so, then I would consider updating the help tip to show the flex-grow syntax for acceptable values per the flex-grow CSS documentation you provided.

@WestonThayer
Copy link
Owner

Correct, it maps to flex-grow, so you can use any positive integer. Thanks for the feedback. I keep wondering if there's some better way to represent flexibility...

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

No branches or pull requests

2 participants