Skip to content

Commit 05bec6d

Browse files
author
wutali
committed
Fix flex
1 parent cf4ca01 commit 05bec6d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/components/Layout.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ export default function Layout({ children }: Props) {
3333
@media (min-width: 769px) {
3434
.root {
3535
display: flex;
36-
flex: 1;
36+
flex: 1 0 auto;
3737
}
3838
main {
39-
flex: 1;
39+
flex: 1 0 auto;
4040
}
4141
}
4242
`}

src/components/PostList.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ export default function PostList({ posts, tags, pagination }: Props) {
5858
.posts {
5959
display: flex;
6060
flex-direction: column;
61-
flex: 1;
61+
flex: 1 1 auto;
6262
}
6363
.posts li {
6464
margin-bottom: 1.5rem;
6565
}
6666
.post-list {
67-
flex: 1;
67+
flex: 1 0 auto;
6868
}
6969
.categories {
7070
display: none;

src/components/TagPostList.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default function TagPostList({ posts, tag, pagination }: Props) {
6060
ul {
6161
margin: 0;
6262
padding: 0;
63-
flex: 1;
63+
flex: 1 0 auto;
6464
}
6565
li {
6666
list-style: none;

src/layouts/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function Index({
103103
margin-right: 0.5rem;
104104
}
105105
article {
106-
flex: 1;
106+
flex: 1 0 auto;
107107
}
108108
h1 {
109109
margin: 0 0 0.5rem;

src/pages/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function Index() {
2525
display: flex;
2626
align-items: center;
2727
justify-content: center;
28-
flex: 1;
28+
flex: 1 1 auto;
2929
padding: 0 1.5rem;
3030
}
3131
h1 {

0 commit comments

Comments
 (0)