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

Feature: display the language of code snippets

This commit is contained in:
Cotes Chung
2020-12-18 20:32:07 +08:00
parent 260a906b11
commit 8e5d8b8931
3 changed files with 39 additions and 0 deletions

View File

@@ -148,3 +148,20 @@ div {
}
}
}
[class^='language-']::before {
content: attr(lang);
position: absolute;
right: 1.8rem;
margin-top: 3px;
font-size: .7rem;
font-weight: 600;
color: var(--highlight-lineno-color);
text-transform: uppercase;
}
@media (min-width: 768px) {
[class^='language-']::before {
right: 3.1rem;
}
}