setting:コードブロックにアイコン
問題
import元を修正したが
設定
style.css@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css");
style.css.line span.code-block .code-block-start [title]:before {
text-decoration: none !important;
font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free";
font-weight: 400;
display: inline-block;
}
style.css.line span.code-block .code-block-start [title="fish"]:before,
.line span.code-block .code-block-start [title="bash"]:before,
.line span.code-block .code-block-start [title="zsh"]:before,
.line span.code-block .code-block-start [title="sh"]:before,
.line span.code-block .code-block-start [title="terminal"]:before {
font: var(--fa-font-solid);
content: '\f120 ';
}
style.css.line span.code-block .code-block-start [title="css"]:before {
font: var(--fa-font-brands);
content: '\f38b ';
}
style.css.line span.code-block .code-block-start [title="html"]:before {
font: var(--fa-font-brands);
content: '\f13b ';
}
style.css.line span.code-block .code-block-start [title="javascript"]:before {
font: var(--fa-font-brands);
content: '\f3b9 ';
}
辞書
style.css.line span.code-block .code-block-start [title="toml"]:before,
.line span.code-block .code-block-start [title="json"]:before,
.line span.code-block .code-block-start [title="yaml"]:before {
font: var(--fa-font-solid);
content: '\f1de ';
}
style.css.line span.code-block .code-block-start [title="gitignore"]:before {
font: var(--fa-font-brands);
content: '\f841 ';
}
style.css.line span.code-block .code-block-start [title="markdown"]:before {
font: var(--fa-font-brands);
content: '\f60f ';
}
style.css.line span.code-block .code-block-start [title="haskell"]:before {
font: var(--fa-font-solid);
content: '\f121 ';
}
style.css.line span.code-block .code-block-start [title="rust"]:before {
font: var(--fa-font-brands);
content: '\e07a ';
}
style.css.line span.code-block .code-block-start [title="sig"]:before {
font: var(--fa-font-solid);
content: '\f233 ';
}
更新
2024/2/17
2021/5/28
a::before
から :before
に
無名のときに対応
スペースに気をつける
参考
この人はnerdfont入りのフォントをアップロードして使ってた