Skip to content

Commit cae5eb6

Browse files
authored
Merge pull request #352 from processing/spacing-tweaks
Spacing tweaks
2 parents 3572b13 + 45ac22a commit cae5eb6

16 files changed

Lines changed: 83 additions & 31 deletions

File tree

src/components/GridItem/Person.astro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ const { item: person } = Astro.props;
1717
/>
1818
</div>
1919
<a
20-
class="text-body mt-xs"
2120
href={person.data.url}
2221
aria-label={`Link to ${person.data.name}'s personal website'`}
23-
>
24-
{person.data.name}
22+
><p class="text-body mt-xs">{person.data.name}</p>
2523
</a>
2624
<p class="text-body-caption mt-xxs">{person.data.role}</p>

src/components/Nav/JumpToLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const JumpToLinks = ({
2727
>
2828
<span>{heading}</span>
2929
<div class="pt-[6px]">
30-
<Icon kind={isOpen ? "chevron-up" : "chevron-down"} />
30+
<Icon kind={isOpen ? "chevron-down" : "chevron-up"} />
3131
</div>
3232
</button>
3333
{isOpen && (

src/components/Nav/MainNavLinks.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ export const MainNavLinks = ({
4242
<Logo />
4343
</a>
4444

45-
<button onClick={handleToggle} aria-hidden="true" tabIndex={-1}>
45+
<button
46+
class={styles.toggle}
47+
onClick={handleToggle}
48+
aria-hidden="true"
49+
tabIndex={-1}
50+
>
4651
<div class={styles.mobileMenuLabel}>
4752
{isOpen ? (
4853
<Icon kind="close" />

src/components/Nav/styles.module.scss

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
margin-bottom: 10px;
7070
}
7171

72+
.toggle {
73+
display: grid;
74+
}
75+
7276
ul {
7377
grid-column: 1 / 2;
7478
font-size: 1.25rem;
@@ -104,6 +108,7 @@
104108
display: none;
105109
@media (min-width: $breakpoint-tablet) {
106110
display: block;
111+
margin-top: 5px;
107112
}
108113
}
109114

@@ -141,7 +146,7 @@
141146
overflow-x: hidden;
142147
display: grid;
143148
grid-template-columns: 1fr 1fr;
144-
padding: var(--spacing-sm) 1.25rem;
149+
padding: 0 1.25rem var(--spacing-sm);
145150
font-size: 1.5rem;
146151
line-height: 1.167;
147152
-webkit-text-stroke-width: 0.15px;
@@ -156,10 +161,6 @@
156161
// Firefox
157162
-ms-overflow-styles: none;
158163
scrollbar-width: none;
159-
160-
li {
161-
padding-bottom: var(--spacing-xxs);
162-
}
163164
}
164165

165166
.toggle {
@@ -170,14 +171,19 @@
170171
}
171172

172173
@media (min-width: $breakpoint-tablet) {
173-
height: 80px;
174+
height: fit-content;
174175
border-top-width: 1px;
175176
margin-top: auto;
176177

177178
&:global(.open) {
178179
height: 100%;
179180
overflow-y: scroll;
180181
}
182+
183+
.toggle {
184+
padding: 20px;
185+
}
186+
181187
ul {
182188
padding-bottom: var(--spacing-md);
183189
display: inline-block;
@@ -189,10 +195,6 @@
189195
}
190196
}
191197

192-
:global(.reference-item) .jumpto ul {
193-
grid-template-columns: 1fr;
194-
}
195-
196198
.buttonlink {
197199
display: flex;
198200
width: 100%;
@@ -223,23 +225,38 @@
223225
}
224226

225227
&:not(:global(.small)) {
228+
// text-h3
226229
font-size: 1.5rem;
227230
line-height: 1.167;
228231
-webkit-text-stroke-width: 0.15px;
229232
}
230233
&:global(.small) {
231-
@extend .text-body;
234+
// text-body
235+
font-size: 1rem;
236+
line-height: 1.25;
237+
-webkit-text-stroke-width: 0.05px;
232238
}
233239

234240
@media (min-width: $breakpoint-tablet) {
241+
&:global(.small) {
242+
// text-body-caption
243+
font-size: 0.875rem;
244+
line-height: 1.42;
245+
-webkit-text-stroke-width: 0.1px;
246+
}
235247
&:not(&:global(.small)) {
248+
// text-body-large
236249
font-size: 1.25rem;
237250
line-height: 1.2;
238251
-webkit-text-stroke-width: 0.15px;
239252
}
240253
}
241254
}
242255

256+
.linklabel:not(:global(.small)) + .linklabel:global(.small) {
257+
margin-top: 4px;
258+
}
259+
243260
/* Interaction */
244261

245262
.jumpto:global(.open) {
@@ -255,3 +272,16 @@
255272
}
256273
}
257274
}
275+
276+
/* Page-specific modifications */
277+
:global(.reference-item) .jumpto ul {
278+
grid-template-columns: 1fr;
279+
}
280+
281+
:global(.contribute),
282+
:global(.tutorials),
283+
:global(.about) {
284+
.jumpto ul li.linklabel:not(:global(.small), :first-child) {
285+
margin-top: 10px;
286+
}
287+
}

src/components/PageHeader/RootPage.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const borderStyle = isFilterRoute ? "" : "border-b border-sidebar-type-color";
1212
---
1313

1414
<div
15-
class=`min-h-[350px] h-[50vh] pt-5xl lg:pt-4xl bg-accent-color text-accent-type-color pb-md px-5 md:px-lg ${borderStyle}`
15+
class=`grid grid-cols-2 lg:grid-cols-4 gap-x-[40px] min-h-[350px] h-[50vh] pt-5xl lg:pt-4xl bg-accent-color text-accent-type-color pb-md px-5 md:px-lg ${borderStyle}`
1616
>
17-
<h1 class="whitespace-pre-line">{title}</h1>
18-
<p class="text-h3 mt-0 mb-3xl">{subtitle}</p>
17+
<h1 class="whitespace-pre-line col-span-full mb-5">{title}</h1>
18+
<p class="text-h3 !mt-0 mb-3xl col-span-3">{subtitle}</p>
1919
</div>

src/components/ReferenceDirectoryWithFilter/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ export const ReferenceDirectoryWithFilter = ({
161161
return (
162162
<div>
163163
<div class="h-0 overflow-visible">
164-
<div class="relative -top-[75px] h-[75px] border-b border-sidebar-type-color bg-accent-color px-5 pb-lg md:px-lg">
165-
<div class="text-body flex w-full max-w-[750px] border-b border-accent-type-color text-accent-type-color">
164+
<div class="relative -top-[75px] grid h-[75px] grid-cols-2 gap-x-[40px] border-b border-sidebar-type-color bg-accent-color px-5 pb-lg md:px-lg lg:grid-cols-4">
165+
<div class="text-body col-span-3 flex w-full max-w-[750px] border-b border-accent-type-color text-accent-type-color">
166166
<input
167167
type="text"
168168
id="search"

src/components/RelatedItems/index.astro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ const { title, items, class: className } = Astro.props;
2424
<div class={className}>
2525
<hr />
2626
<h2 class="mt-md mb-lg">{title}</h2>
27-
<div
28-
class="grid grid-cols-2 lg:grid-cols-4 gap-y-xl gap-x-[40px] lg:gap-x-10"
29-
>
27+
<div class="grid grid-cols-2 lg:grid-cols-4 gap-y-xl gap-x-[40px]">
3028
{
3129
items.map((i) => {
3230
if (isCurationResponse(i)) {

src/components/Settings/styles.module.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
padding: var(--spacing-sm) 1.25rem;
1717
grid-template-columns: repeat(6, minmax(0, 1fr));
1818
grid-template-rows: repeat(2, var(--settings-container-height-touch));
19-
gap: 20px;
19+
row-gap: 20px;
20+
column-gap: 40px;
2021

2122
@media (min-width: $breakpoint-tablet) {
2223
width: calc(100% - var(--nav-offset-x));

src/content/text-detail/en/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ p5.js prioritizes accessibility, inclusivity, community, and joy. It makes sketc
1313
p5.js encourages iterative coding for creative expression. We value open source and access for all. Our community provides inspiration and support to learn, create, imagine, design, share, and code freely.
1414
</div>
1515

16-
<hr/>
16+
<hr class='full-bleed'/>
1717

1818
## Community Statement
1919

src/content/text-detail/es/about.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ p5.js prioriza la accesibilidad, la inclusión, la comunidad y la alegría. Hace
1313
p5.js fomenta la programación iterativa para la expresión creativa. Valoramos el código abierto y el acceso para todos. Nuestra comunidad proporciona inspiración y apoyo para aprender, crear, imaginar, diseñar, compartir y programar libremente.
1414
</div>
1515

16+
<hr class='full-bleed'/>
17+
1618
## Declaración de la comunidad
1719

1820
<div class='text-body-large'>

0 commit comments

Comments
 (0)