Skip to content

Commit

Permalink
perf(root): use grid instead of flex
Browse files Browse the repository at this point in the history
  • Loading branch information
clshortfuse committed Aug 9, 2023
1 parent 02efab1 commit ad60541
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export default CustomElement
`
.css`
:host {
display: flex;
display: grid;
grid-auto-flow: column;
grid-template-rows: 1fr;
grid-template-columns: auto 1fr auto;
overflow-x: clip;
font: var(--mdw-typescale__body-large__font);
Expand All @@ -24,7 +27,7 @@ export default CustomElement
#center {
display: block;
flex: 1;
grid-column: 2;
}
`
Expand Down
5 changes: 5 additions & 0 deletions components/SideSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ export default CustomElement
min-block-size: 100vh;
min-block-size: 100dvh;
max-block-size: 100%;
grid-column: 1;
visibility: hidden;
Expand Down Expand Up @@ -283,6 +284,10 @@ export default CustomElement
z-index: 24;
}
:host(:where[inline-end]) {
grid-column: 3;
}
:host(:where([inline-end][modal])) {
inset-inline: auto 0;
Expand Down

0 comments on commit ad60541

Please sign in to comment.