Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Design system spacing #95

Unanswered
IanDuncanson asked this question in Q&A
Discussion options

Hey Allan, great library. In many modern design systems, content is laid out based on a common spacing model or grid (example here) so everything lines up nicely. Just wondered if it was possible to set up the resizing algorithms so they are "constrained" by simple rules (e.g. only resize to an 8 x 8 grid. Another example is with panes with table contents, you want to resize the pane so that a new row is added, so the constraint is based on the row heights of the contained table, rather than showing partial rows.

Cheers,
Ian

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

Hi @IanDuncanson

I presume you mean specifying a grid or snap points of some sorts and the final resize being constrained to those points? If so, then it absolutely would be achievable. I've added #96 to get the feature on my radar.

You must be logged in to vote
1 reply
Comment options

Not sure if I explained it well enough, but i think you understood it - the resize is constrained by snap points. So, if i am using a 4px grid (or lets say 0.25rem), my entire viewport is normally broken up into many 4px by 4px squares, and all the content is aligned on that grid of squares (both the top/left and the right/bottom or width/height). Then if I resize, the splitter between the two elements being resized will snap to those 4px grid points rather than every 1px

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /