Skip to content

Commit 4ae5c8a

Browse files
committed
use code tag for codeblock filename
1 parent f597beb commit 4ae5c8a

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

assets/_shortcodes.scss

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,11 @@
223223
}
224224

225225
.book-codeblock-filename {
226-
background: var(--gray-100);
227-
border: $padding-1 solid var(--gray-200);
228-
border-bottom: 0;
229-
font-size: var(--font-size-smaller);
230-
margin-top: $padding-16;
226+
display: block;
231227
padding: $padding-4 $padding-8;
232-
border-start-start-radius: var(--border-radius);
233-
border-start-end-radius: var(--border-radius);
228+
border-bottom: 0;
229+
font-size: var(--font-size-smallest);
230+
border-radius: var(--border-radius) var(--border-radius) 0 0;
234231

235232
a {
236233
color: var(--body-font-color);

layouts/_markup/render-codeblock.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{{- if $href -}}
44
{{- $href = partial "docs/links/portable-link" (dict "Page" $.PageInner "Destination" $href) -}}
55
{{- end -}}
6-
<div class="book-codeblock-filename">
6+
<code class="book-codeblock-filename">
77
<a {{ with $href }}href="{{ . }}"{{ end }}>{{ . }}</a>
8-
</div>
8+
</code>
99
{{- end -}}
1010
{{- (transform.HighlightCodeBlock . .Options).Wrapped -}}

0 commit comments

Comments
 (0)