1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Add custom title to code block

This commit is contained in:
Cotes Chung
2021-09-15 22:50:28 +08:00
parent 42ff0f2282
commit beabb36d7f
2 changed files with 36 additions and 19 deletions

View File

@@ -172,14 +172,22 @@ div {
align-items: center;
line-height: 1.85rem;
// language badge
// text data
&::before {
content: attr(data-lang);
content: attr(text-data);
color: var(--lang-badge-color);
padding-left: 1em;
// language
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
padding-left: 1em;
// file name
@at-root [file] #{&} {
font-size: 0.85rem;
text-transform: none;
}
}
// clipboard