Skip to content

Commit 34c9e0a

Browse files
committed
style(audio): enhance audio element styling for better presentation
1 parent 437fa67 commit 34c9e0a

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

assets/css/common/md-content.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,17 @@ mark {
230230
}
231231

232232
audio {
233-
width: stretch;
234-
max-width: 100%;
233+
display: block;
234+
width: 100%;
235+
border: 1px solid var(--border);
236+
border-radius: var(--radius);
237+
overflow: hidden;
238+
height: 2.5rem;
239+
margin-bottom: var(--content-gap);
240+
}
241+
242+
audio::-webkit-media-controls-enclosure {
243+
border-radius: 0;
235244
}
236245

237246
video {

layouts/shortcodes/audio.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{{ $src := (.Get "src") }}
2-
<audio src="{{ $src }}" controls muted></audio>
2+
<audio src="{{ $src }}" controls muted loading="lazy"></audio>

0 commit comments

Comments
 (0)