Skip to content

Commit de15dde

Browse files
committed
give anchors padding
1 parent 9f9c882 commit de15dde

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/components/ReferenceDirectoryWithFilter/index.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,20 @@ export const ReferenceDirectoryWithFilter = ({
111111
}
112112

113113
return (
114-
<div class="my-[40px]">
114+
<>
115115
{subcat.name.includes("p5.") ? (
116116
<a
117117
id={subcat.name}
118118
href={`/reference/${category.name === "p5.sound" ? "p5.sound" : "p5"}/${subcat.name}`}
119119
>
120-
<h3 className="m-0">{subcat.name}</h3>
120+
<h3 className="m-0 py-[40px]">{subcat.name}</h3>
121121
</a>
122122
) : (
123-
<h3 className="m-0">
123+
<h3 className="m-0 py-[40px]" id={subcat.name}>
124124
{subcat.name}
125-
<a id={subcat.name} />
126125
</h3>
127126
)}
128-
</div>
127+
</>
129128
);
130129
};
131130

@@ -135,9 +134,8 @@ export const ReferenceDirectoryWithFilter = ({
135134
}
136135
return filteredEntries.map((category) => (
137136
<section key={category.name}>
138-
<h2>
137+
<h2 class="mb-0" id={category.name}>
139138
{category.name}
140-
<a id={category.name} />
141139
</h2>
142140
{category.subcats.map((subcat) => (
143141
<div key={subcat.name}>

styles/global.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ hr {
204204
section,
205205
.section {
206206
border-bottom-width: 1px;
207-
margin-top: 20px;
208207
border-color: var(--type-color);
209208
padding-bottom: 80px;
210209

@@ -214,6 +213,7 @@ section,
214213

215214
h2,
216215
.text-h2 {
216+
padding-top: 20px;
217217
margin-top: 0px;
218218
margin-bottom: 40px;
219219
}

0 commit comments

Comments
 (0)