-
-
Notifications
You must be signed in to change notification settings - Fork 26
Design system spacing #95
-
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
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
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
Beta Was this translation helpful? Give feedback.