Skip to content

Commit

Permalink
Fix inline height flex grow problem for slate grids (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Nov 29, 2021
1 parent a332601 commit 86965a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugfix

- Fix inline height flex grow problem for slate grids @sneridagh

### Internal

## 2.4.0 (2021-11-04)
Expand Down
5 changes: 4 additions & 1 deletion src/components/Grid/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const ViewGrid = ({ data, render, path }) => {

<Grid stackable stretched columns={data.columns.length}>
{data.columns.map((column) => (
<Grid.Column key={column.id}>
<Grid.Column
key={column.id}
className={`grid-block-${column['@type']}`}
>
<BlockRenderer
block={column.id}
type={column['@type']}
Expand Down
8 changes: 8 additions & 0 deletions src/theme/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@
}
}

// This is required to overcome the inline-flex imposed from semantic grids
.block.__grid,
[class$='Grid'].block {
.ui.stretched.grid > .column.grid-block-slate {
display: block !important;
}
}

.block-editor-__grid .block .toolbar,
[class$='Grid'] .block .toolbar {
top: -49px;
Expand Down

0 comments on commit 86965a7

Please sign in to comment.