Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions assets/sass/expander.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
.o-expander > hr {
margin: 0;
}

.o-expander__summary {
display: flex;

padding: 1.2rem;
gap: 0.5rem;
align-items: center;
transition: background .3s ease;

&:not(.o-expander__summary--booking) {
font-weight: 700;
}

&:hover,
&:focus {
.o-expander__summary-text {
font-weight: 700;
text-decoration: underline;
}

border-radius: var(--border-radius-m);
background: rgba($link-hovered, 0.15);
}

&--booking {
Expand All @@ -22,29 +33,35 @@
}
}

.details-screen[open] > .o-expander__summary {
&:hover,
&:focus {
border-radius: var(--border-radius-m) var(--border-radius-m) 0 0;
}
}

.o-expander__content {
padding: 1.2rem;
}

.details-print {
display: none;
}

details {
position: relative;
padding: 1.2rem;
background-color: var(--bg-neutral);
border-radius: var(--border-radius-m);
margin-bottom: 1.2rem;
border: var(--border);
}

details[open] > .o-expander__summary {
margin-bottom: 0.5rem;
}

details > summary {
list-style-type: none;
}

.details-screen > .o-expander__summary {
margin-right: 3.2rem;
padding-right: 3.2rem;
}

details > div {
Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/booking.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
</div>
</summary>
<hr aria-hidden="true">
<div class="o-expander__content">
{{- if .info -}}
<div class="o-booking__info">
{{- .info | .original_page.RenderString -}}
Expand All @@ -54,3 +55,4 @@
</div>

{{ partial "booking-links" .page }}
</div>
8 changes: 4 additions & 4 deletions layouts/shortcodes/expander.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{{- partial "icon" (index $iconMapping $param) -}}
<span class="o-expander__summary-text">{{ (.Get 0) }}</span>
</summary>
<div>
<hr aria-hidden="true">
<hr aria-hidden="true">
<div class="o-expander__content">
{{ .Inner }}
</div>
</details>
Expand All @@ -21,8 +21,8 @@
<summary class="o-expander__summary">
<span class="o-expander__summary-text">{{ (.Get 0) }}</span>
</summary>
<div>
<hr aria-hidden="true">
<hr aria-hidden="true">
<div class="o-expander__content">
{{ .Inner }}
</div>
</details>
Loading