Skip to content

Commit de61946

Browse files
committed
tweaks
1 parent 7db7c1c commit de61946

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

apps/svelte.dev/src/routes/packages/Category.svelte

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
</script>
2020

2121
<section class="category">
22-
<header bind:this={header}>
23-
<h2>
24-
{title}
25-
</h2>
26-
</header>
22+
<h2 bind:this={header}>
23+
{title}
24+
</h2>
25+
2726
{#if description}
28-
<h3>{@html description}</h3>
27+
<p>{@html description}</p>
2928
{/if}
3029

3130
<div class="content">
@@ -47,7 +46,7 @@
4746
const { bottom } = header.getBoundingClientRect();
4847

4948
// if the current section is wholly visible, don't muck about with the scroll position
50-
if (bottom > 0) {
49+
if (!showAll || bottom > 0) {
5150
showAll = !showAll;
5251
return;
5352
}
@@ -70,12 +69,8 @@
7069
margin-bottom: 3rem;
7170
}
7271
73-
header {
74-
margin-bottom: 1rem;
75-
76-
h2 {
77-
margin: 0;
78-
}
72+
h2 {
73+
margin: 0 0 1rem 0;
7974
}
8075
8176
h3 {

0 commit comments

Comments
 (0)