Skip to content

Commit 3fb72c2

Browse files
authored
Fix article layout responsiveness (#6821)
fix(layouts): Responsiveness Signed-off-by: abizek <[email protected]>
1 parent ed9625b commit 3fb72c2

File tree

15 files changed

+110
-90
lines changed

15 files changed

+110
-90
lines changed

components/Common/CodeTabs/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
border-t
1111
border-neutral-900
1212
bg-neutral-950
13-
px-4
13+
px-2
1414
pt-3
15-
xs:px-2;
15+
md:px-4;
1616

1717
.trigger {
1818
@apply border-b

components/Common/LinkTabs/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
border-b-neutral-200
88
font-open-sans
99
dark:border-b-neutral-800
10-
xs:hidden;
10+
max-xs:hidden;
1111

1212
.tabsTrigger {
1313
@apply border-b-2
@@ -36,6 +36,6 @@
3636
@apply my-6
3737
hidden
3838
w-full
39-
xs:flex;
39+
max-xs:flex;
4040
}
4141
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
.wrapper {
22
@apply flex
3+
w-full
34
flex-col
45
gap-8
56
overflow-auto
6-
border-r
7+
border-r-0
78
border-neutral-200
89
bg-white
910
px-4
1011
py-6
1112
dark:border-neutral-900
1213
dark:bg-neutral-950
14+
sm:border-r
1315
md:max-w-xs
14-
lg:px-6
15-
xs:w-full
16-
xs:border-r-0;
16+
lg:px-6;
1717

1818
> section {
19-
@apply flex
20-
xs:hidden;
19+
@apply hidden
20+
sm:flex;
2121
}
2222

2323
> span {
24-
@apply hidden
24+
@apply flex
2525
w-full
26-
xs:flex;
26+
sm:hidden;
2727
}
2828
}

components/Containers/MetaBar/index.module.css

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
.wrapper {
22
@apply flex
3+
w-full
34
flex-col
45
items-start
56
gap-8
67
overflow-y-auto
7-
border-l
8-
border-l-neutral-200
8+
border-neutral-200
99
px-4
1010
py-6
1111
[overflow-wrap:anywhere]
12-
dark:border-l-neutral-900
13-
md:max-w-xs
14-
lg:px-6
15-
xs:mt-8
16-
xs:w-full
17-
xs:border-l-0
18-
xs:border-t
19-
xs:border-t-neutral-200
20-
xs:dark:border-t-neutral-900;
12+
dark:border-neutral-900
13+
lg:px-6;
2114

2215
dl {
2316
@apply w-full;
@@ -45,8 +38,8 @@
4538
text-neutral-900
4639
underline
4740
dark:text-white
48-
xs:inline-block
49-
xs:py-1;
41+
max-xs:inline-block
42+
max-xs:py-1;
5043

5144
&:hover {
5245
@apply text-neutral-800
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
.wrapper {
22
@apply flex
3+
w-full
34
flex-col
45
items-start
56
gap-8
67
overflow-auto
78
overflow-x-hidden
8-
border-r
99
border-r-neutral-200
1010
bg-white
1111
px-4
1212
py-6
1313
dark:border-r-neutral-900
1414
dark:bg-neutral-950
15+
sm:border-r
1516
md:max-w-xs
16-
lg:px-6
17-
xs:w-full
18-
xs:border-r-0;
17+
lg:px-6;
1918

2019
> section {
21-
@apply flex
22-
xs:hidden;
20+
@apply hidden
21+
sm:flex;
2322
}
2423

2524
> span {
26-
@apply hidden
25+
@apply flex
2726
w-full
28-
xs:flex;
27+
sm:hidden;
2928
}
3029
}

components/Downloads/ChangelogModal/index.module.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
border
2020
border-neutral-200
2121
bg-white
22-
p-8
22+
p-6
2323
focus:outline-none
2424
dark:border-neutral-900
2525
dark:bg-neutral-950
2626
sm:my-20
27+
sm:p-8
2728
lg:max-w-[900px]
28-
xl:p-12
29-
xs:p-6;
29+
xl:p-12;
3030
}
3131

3232
.close {

components/withBlogCategories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const WithBlogCategories: FC<WithBlogCategoriesProps> = ({
3030
tabs={categories}
3131
activeTab={blogData.category}
3232
>
33-
<div className="grid grid-cols-[repeat(auto-fill,minmax(theme(spacing.80),1fr))] [grid-gap:theme(spacing.12)_theme(spacing.8)] xs:grid-cols-[1fr]">
33+
<div className="grid grid-cols-[repeat(auto-fill,minmax(theme(spacing.80),1fr))] [grid-gap:theme(spacing.12)_theme(spacing.8)] max-xs:grid-cols-[1fr]">
3434
{blogData.posts.map(post => (
3535
<BlogPostCard
3636
key={post.slug}

components/withBlogCrossLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const WithBlogCrossLinks: FC = async () => {
2222
];
2323

2424
return (
25-
<div className="mt-4 grid w-full grid-cols-2 gap-4 xs:grid-cols-1">
25+
<div className="mt-4 grid w-full grid-cols-2 gap-4 max-xs:grid-cols-1">
2626
{(previousCrossLink && (
2727
<CrossLink
2828
type="previous"

components/withSidebarCrossLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const WithSidebarCrossLinks: FC<WithCrossLinksProps> = ({ navKey }) => {
2424
];
2525

2626
return (
27-
<div className="mt-4 grid w-full grid-cols-2 gap-4 xs:grid-cols-1">
27+
<div className="mt-4 grid w-full grid-cols-1 gap-4 md:grid-cols-2">
2828
{(previousCrossLink && (
2929
<CrossLink
3030
type="previous"

layouts/About.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ const AboutLayout: FC<PropsWithChildren> = ({ children }) => (
1313
<ArticleLayout>
1414
<WithSidebar navKeys={['about', 'getInvolved']} />
1515

16-
<main>{children}</main>
16+
<div>
17+
<main>{children}</main>
1718

18-
<WithMetaBar />
19+
<WithMetaBar />
20+
</div>
1921

2022
<WithBreadcrumbs navKeys={['about', 'getInvolved']} />
2123
</ArticleLayout>

0 commit comments

Comments
 (0)