Skip to content

Commit 1445535

Browse files
authored
Merge pull request #164 from uidotdev/lf/responsive-fixes
Responsive fixes
2 parents 1c13a4f + 6bdfeaa commit 1445535

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

usehooks.com/src/components/HookDescription.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const { name } = Astro.props;
4343
}
4444

4545
.callout {
46-
margin-top: 1rem;
46+
margin: 1rem 0 1.5rem;
4747
align-self: start;
4848
padding: 1.5rem;
4949
padding-bottom: 0;
@@ -76,6 +76,7 @@ const { name } = Astro.props;
7676
@media screen and (min-width: 811px) {
7777
.callout {
7878
max-width: var(--callout-width);
79+
margin-bottom: 0;
7980
}
8081
}
8182
</style>

usehooks.com/src/components/Install.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ const { class: className } = Astro.props;
4545
display: flex;
4646
justify-content: space-between;
4747
align-items: center;
48-
gap: 2rem;
48+
gap: clamp(.7rem, 3vw, 2rem);
4949
background-color: var(--charcoal);
50-
padding: 1.3rem 1.5rem;
50+
padding: clamp(1rem, 4vw, 1.3rem) clamp(1rem, 4vw, 1.5rem);
5151
border-radius: 0.5rem;
5252
}
5353

5454
.install code {
5555
margin-top: 0.3rem;
56+
padding: 0;
5657
font-size: clamp(0.8rem, 3vw, 1.2rem) !important;
5758
}
5859

usehooks.com/src/pages/[hook].astro

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const installSnippet = experimental
9292
}
9393

9494
section {
95-
padding: calc(var(--body-padding) * 1.6);
95+
padding: clamp(.5rem, 4vw, 3rem);
9696
padding-top: 0;
9797
display: flex;
9898
flex-direction: column;
@@ -122,7 +122,7 @@ const installSnippet = experimental
122122
color: var(--blue);
123123
text-transform: none;
124124
font-family: var(--font-outfit);
125-
font-size: clamp(1.8rem, 5vw, 2.6rem);
125+
font-size: clamp(1.6rem, 5vw, 2.6rem);
126126
font-weight: 600;
127127
}
128128

@@ -151,6 +151,13 @@ const installSnippet = experimental
151151
margin-bottom: 1rem;
152152
}
153153

154+
@media screen and (max-width: 500px) {
155+
.experimental ~ .install {
156+
flex-direction: column;
157+
align-items: flex-start;
158+
}
159+
}
160+
154161
:global(.reference) {
155162
font-size: clamp(1.1rem, 2.2vw, 1.3rem);
156163
}
@@ -166,6 +173,7 @@ const installSnippet = experimental
166173
:global(.reference .table-container) {
167174
width: 100%;
168175
overflow-x: auto;
176+
-webkit-overflow-scrolling: touch;
169177
border: 0.07rem solid rgba(249, 244, 218, 0.1);
170178
}
171179

0 commit comments

Comments
 (0)