Set Grid.props.columns={12} to 100% of width
See original GitHub issueSteps
<Grid columns={12}>
<Grid.Row>
<Grid.Column width={3}>...</Grid.Column>
<Grid.Column width={6}>...</Grid.Column>
<Grid.Column width={3}>...</Grid.Column>
</Grid.Row>
</Grid>
Expected Result
I expect that the columns will now be 100% width, since 12 should be the full amount of columns. (3 + 6 + 3 = 12).
Actual Result
Eventhough i set Grid.props.columns to 12, the full with is still calculated to be 16, so the 12 columns are not 100% of the width, but instead 75% of the width.
Version
0.68.4
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Auto-Sizing Columns in CSS Grid: `auto-fill` vs `auto-fit`
The columns are defined using the repeat() function and have a minimum width of 100px, and a maximum set to 1fr , so...
Read more >grid-template-columns - CSS: Cascading Style Sheets | MDN
The grid-template-columns CSS property defines the line names and track ... #grid { display: grid; width: 100%; grid-template-columns: 50px ...
Read more >How would I make one container in a grid change to 100% ...
I have tried the below code but my element-2 is not expanding to width: 100% . My CSS is: .container{ display: grid; grid-template-columns: ......
Read more >Grid system
container-fluid for width: 100% across all viewport and device sizes. Rows are wrappers for columns. Each column has horizontal padding (called a gutter)...
Read more >React Suite Grid Props
It defines the layout as covering 100% of the width of the parent component. It is true by default. <Grid.Row> Props:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jacknevitt you’ll want to ask that question on the core SUI project for more clarity on that decision. This React project is intended to replicate markup/functionality of that core project in a React way.
@webberwang Please open a new issue with what you are trying to accomplish.
For anyone else landing here:
The width of your
Grid
column are either defined by setting thecolumns
count onGrid
or setting thewidth
(out of 16) individually on aGrid.Column
. TheGrid
component also accepts some other responsive values tocolumns
like “equal”.Grid.Row
will also accept the same values asGrid
if you want to control columns differently by row.Mixing control between
Grid
/Grid.Row
andGrid.Column
is not advised. You need to decide to control width per column, or via the parent row or grid.If you feel like you need to have a different grid system with a different count of columns and gutter widths, you’ll need to build your own CSS with build tools for SUI.