Skip to content

Commit 9c9f52c

Browse files
committed
standardize grid gutters
1 parent 3d29d39 commit 9c9f52c

19 files changed

Lines changed: 82 additions & 34 deletions

src/components/Footer/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const t = await getUiTranslator(currentLocale);
77
---
88

99
<footer
10-
class="text-body border-t border-black grid-cols-3 lg:grid-cols-4 grid gap-x-[40px] pt-md pb-5 px-lg bg-accent-color text-accent-type-color content-start"
10+
class="text-body border-t border-black grid-cols-3 lg:grid-cols-4 grid gap-x-gutter-sm lg:gap-x-gutter-md pt-md pb-5 px-lg bg-accent-color text-accent-type-color content-start"
1111
>
1212
<div class="grid lg:row-span-2 grid-rows-subgrid">
1313
<div>

src/components/PageHeader/RootPage.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const borderStyle = isFilterRoute ? "" : "border-b border-sidebar-type-color";
1212
---
1313

1414
<div
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}`
15+
class=`grid grid-cols-2 lg:grid-cols-4 gap-x-gutter-sm lg:gap-x-gutter-md 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
>
1717
<h1 class="whitespace-pre-line col-span-full mb-5">{title}</h1>
1818
<p class="text-h3 !mt-0 mb-3xl col-span-2">{subtitle}</p>

src/components/ReferenceDirectoryWithFilter/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ export const ReferenceDirectoryWithFilter = ({
117117
id={subcat.name}
118118
href={`/reference/${category.name === "p5.sound" ? "p5.sound" : "p5"}/${subcat.name}`}
119119
>
120-
<h3 className="m-0 py-[40px]">{subcat.name}</h3>
120+
<h3 className="py-gutter-md m-0">{subcat.name}</h3>
121121
</a>
122122
) : (
123-
<h3 className="m-0 py-[40px]" id={subcat.name}>
123+
<h3 className="py-gutter-md m-0" id={subcat.name}>
124124
{subcat.name}
125125
</h3>
126126
)}
@@ -157,7 +157,7 @@ export const ReferenceDirectoryWithFilter = ({
157157
return (
158158
<div>
159159
<div class="h-0 overflow-visible">
160-
<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">
160+
<div class="gap-x-gutter-sm lg:gap-x-gutter-md relative -top-[75px] grid h-[75px] grid-cols-2 border-b border-sidebar-type-color bg-accent-color px-5 pb-lg md:px-lg lg:grid-cols-4">
161161
<div class="text-body col-span-2 flex w-full max-w-[750px] border-b border-accent-type-color text-accent-type-color">
162162
<input
163163
type="text"

src/components/RelatedItems/index.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const { title, items, class: className } = Astro.props;
2525
<hr />
2626
<section class={className}>
2727
<h2>{title}</h2>
28-
<ul class="grid grid-cols-2 lg:grid-cols-4 gap-y-xl gap-x-[40px]">
28+
<ul
29+
class="grid grid-cols-2 lg:grid-cols-4 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md"
30+
>
2931
{
3032
items.map((i) => {
3133
if (isCurationResponse(i)) {

src/components/SearchForm/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const t = await getUiTranslator(currentLocale);
2020
type="search"
2121
placeholder={t("Search") as string}
2222
name="term"
23-
class="placeholder-accent-type-color bg-transparent pl-[40px] py-[6px] md:py-[4px] lg:py-[8px] w-full rounded-[20px] focus:outline-0 peer"
23+
class="placeholder-accent-type-color bg-transparent pl-gutter-md py-[6px] md:py-[4px] lg:py-[8px] w-full rounded-[20px] focus:outline-0 peer"
2424
aria-label="Search through site content"
2525
required
2626
/>

src/layouts/AboutLayout.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ const displayedFeaturedPeople = sortedFeaturedPeople.slice(0, 6);
8181

8282
<section>
8383
<h2 id="contact">{t("Contact")}</h2>
84-
<div class="text-2xl grid grid-cols-6 lg:grid-cols-9 gap-x-[40px] mt-xl">
84+
<div
85+
class="text-2xl grid grid-cols-6 lg:grid-cols-9 gap-x-gutter-sm lg:gap-x-gutter-md mt-xl"
86+
>
8587
<div class="col-span-2 lg:col-span-3">Email</div><div
8688
class="col-span-4 lg:col-span-6"
8789
>

src/layouts/CommunityLayout.astro

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ setJumpToState({
4646
<BaseLayout title="Community">
4747
<section>
4848
<h2>{t("Sketches")}<a id="sketches"></a></h2>
49-
<ul class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
49+
<ul
50+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
51+
>
5052
{
5153
sketches.map((sk, i) => (
5254
<li
@@ -64,7 +66,9 @@ setJumpToState({
6466
))
6567
}
6668
</ul>
67-
<div class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
69+
<div
70+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
71+
>
6872
<LinkButton url="/sketches" variant="link" class="mt-lg col-span-1 w-full"
6973
>{t("All Sketches")}</LinkButton
7074
>
@@ -73,7 +77,9 @@ setJumpToState({
7377

7478
<section>
7579
<h2>{t("Libraries")}<a id="libraries"></a></h2>
76-
<ul class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
80+
<ul
81+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
82+
>
7783
{
7884
libraries.map((lib) => (
7985
<li>
@@ -82,7 +88,9 @@ setJumpToState({
8288
))
8389
}
8490
</ul>
85-
<div class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
91+
<div
92+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
93+
>
8694
<LinkButton
8795
url="/libraries"
8896
variant="link"
@@ -93,7 +101,9 @@ setJumpToState({
93101

94102
<section>
95103
<h2>{t("Events")}<a id="events"></a></h2>
96-
<ul class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
104+
<ul
105+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
106+
>
97107
{
98108
events.map((event, i) => (
99109
<li
@@ -109,7 +119,9 @@ setJumpToState({
109119
))
110120
}
111121
</ul>
112-
<div class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
122+
<div
123+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
124+
>
113125
<LinkButton url="/events" variant="link" class="mt-lg col-span-1 w-full"
114126
>{t("All Events")}</LinkButton
115127
>

src/layouts/ContributeLayout.astro

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ setJumpToState({
5353
<BaseLayout title="Contribute">
5454
<section>
5555
<h2 id="docs">{t("Contributor Docs")}</h2>
56-
<div class="mb-md grid grid-cols-1 gap-x-[40px] lg:grid-cols-2">
56+
<div
57+
class="mb-md grid grid-cols-1 gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-2"
58+
>
5759
<div>
5860
<Image
5961
src={ContributeImage}
@@ -67,7 +69,9 @@ setJumpToState({
6769
{t("contributePage", "Statement")}
6870
</p>
6971
</div>
70-
<ul class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
72+
<ul
73+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
74+
>
7175
{
7276
entries.map((entry) => (
7377
<li>
@@ -79,7 +83,9 @@ setJumpToState({
7983
</section>
8084
<section>
8185
<h2 id="donate">{t("Donate")}</h2>
82-
<ul class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
86+
<ul
87+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
88+
>
8389
{
8490
// This is the same markup as in ContributorDocItem
8591
donateSectionItems.map((it) => (

src/layouts/EventsLayout.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ setJumpToState(null);
2323
<Head title={"Events"} locale={currentLocale} />
2424

2525
<BaseLayout title="Events" variant="item" topic="community">
26-
<ul class="grid grid-cols-2 gap-y-xl gap-x-[40px] lg:grid-cols-4">
26+
<ul
27+
class="grid grid-cols-2 gap-y-xl gap-x-gutter-sm lg:gap-x-gutter-md lg:grid-cols-4"
28+
>
2729
{entries.map((entry) => <GridItemEvent item={entry} />)}
2830
</ul>
2931
<PaginationNav

src/layouts/ExamplesLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ setJumpToState(jumpToState);
6161
<h2 class="col-span-full">
6262
{category.name} <a id={category.name.toLowerCase()} />
6363
</h2>
64-
<ul class="col-span-full grid grid-cols-2 lg:grid-cols-4 gap-x-[20px] gap-y-[40px] lg:gap-x-[40px]">
64+
<ul class="col-span-full grid grid-cols-2 lg:grid-cols-4 gap-y-gutter-md gap-x-gutter-sm lg:gap-x-gutter-md">
6565
{category.examples.map((exampleEntry, i) => (
6666
<li class="col-span-1">
6767
{<GridItemExample item={exampleEntry} lazyLoad={i <= 4} />}

0 commit comments

Comments
 (0)