GridLayout Suggestions #3037
Closed
brianblakely
started this conversation in
Feedback
Replies: 2 comments
-
Sounds reasonable to me. Hopefully this doesn't have impact on |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the suggestion, this has now been implemented |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
*Gauging interest in pursuing these suggestions. I would be happy to file a PR for the same.
I have recently completed a large migration to Salt from a former design system and one of the tasks that I spent the most time doing was converging on a layout methodology using Salt's provided solutions. What I found was that I could not use GridLayout due to some limitations that I believe can be expanded with some simple, non-breaking enhancements.
Column Templates
Issue
GridLayout assigns every column a width of
1fr
. Sometimes I would like column width to conform to content or a unit-based value that is notfr
.Suggested Solution
columns
prop may accept an array which maps togrid-template-columns
. Each array element accepts the following types:fr
units.Example
<GridLayout columns={[1, "auto", "10ch"]} rows={2}>
Automatic Row Creation
Issue
Layouts may change the number of rows dynamically. While this can be handled in-app by providing a programmatic numeric value to
rows
, it can grow cumbersome with many conditions.Suggested Solution
rows
prop may accept a string which maps togrid-auto-rows
.Example
<GridLayout columns={3} rows="100px">
<GridLayout columns={3} rows="auto">
Beta Was this translation helpful? Give feedback.
All reactions