Skip to content

Commit 796e707

Browse files
committed
Faq new style.
1 parent 7515d6f commit 796e707

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/components/accordion/accordion.astro

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,26 @@ const { title, id } = Astro.props;
1111
<summary
1212
aria-expanded="false"
1313
aria-controls={id}
14-
class="cursor-pointer flex justify-between p-2 rounded-md border-t border-b focus:ring-2"
14+
class="cursor-pointer flex justify-between p-2 bg-[#d4d5e5] focus:ring-2"
1515
>
1616
<span class="font-semibold">{title}</span>
17-
<span aria-hidden="true" class="group-open:hidden">+</span>
18-
<span aria-hidden="true" class="group-open:block hidden">−</span>
17+
<span aria-hidden="true" class="group-open:hidden arrow">▼</span>
18+
<span aria-hidden="true" class="group-open:block hidden arrow">▲</span>
1919
</summary>
2020

2121
<div class="pl-4">
2222
<slot />
2323
</div>
2424
</details>
25-
25+
<style>
26+
details {
27+
width:65ch;
28+
}
29+
.arrow {
30+
font-size:25px;
31+
line-height: 1.25;
32+
}
33+
</style>
2634
<script>
2735
document.addEventListener("DOMContentLoaded", () => {
2836
const hash = window.location.hash.substring(1); // Remove #

0 commit comments

Comments
 (0)