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

Add flexible bands #138

Open
gillsonkell opened this issue Jan 9, 2020 · 4 comments
Open

Add flexible bands #138

gillsonkell opened this issue Jan 9, 2020 · 4 comments

Comments

@gillsonkell
Copy link

This isn't a necessity but would be nice.

Basically a way to band like CSS Flexbox.

  • The default band width is the whole page within the margins, but can be set otherwise
  • Cells can be given pixel, percent, or flex factor widths, but default to a flex factor width of 1 so the width is evenly divided between them
  • Gutter amounts are subtracted from cells with a flex factor width first, then cells with specific widths set if necessary

Examples for a printable area of 100:

  • Widths: 50%, 50%, gutter: 5 - Result: 47.5px, 47.5px
  • Widths 1, 1, 1 (flex factors), gutter: 5 - Result: 30px, 30px, 30px
  • Widths 50%, 25px, 1, 1, gutter: 5 - Result: 50px, 25px, 5px, 5px
@NathanaelA
Copy link
Owner

That shouldn't be terribly hard. However, I think it might cause some confusion as we don't use "px" in the engine and so when it sees say "10" does it treat it as pixels or flex areas. :) But maybe the engine could use something like "1*" or some other code to designate flex areas.

@gillsonkell
Copy link
Author

Yeah "1*" might work for flex values or whatever you think!

@beauwest
Copy link
Contributor

I wonder if it'd be better to use some of the same conventions as Flexbox & Grid. In this case use the fr unit maybe?

That way it's at least somewhat intuitive.

@NathanaelA
Copy link
Owner

Yeah, fr could be it. Thanks Beau.

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

No branches or pull requests

3 participants