From de7d2fab7cc0a7ef5b6bfd6c7b6cef76552c1782 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 8 Feb 2021 03:46:20 +0800 Subject: [PATCH] Optimize the language badge position in code block --- _sass/addon/syntax.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_sass/addon/syntax.scss b/_sass/addon/syntax.scss index 49cec21..3651c48 100644 --- a/_sass/addon/syntax.scss +++ b/_sass/addon/syntax.scss @@ -157,7 +157,7 @@ div { div[class^='language-']::before { content: attr(lang); position: absolute; - right: 1.8rem; + right: 2rem; margin-top: 3px; font-size: 0.7rem; font-weight: 600; @@ -170,3 +170,9 @@ div[class^='language-']::before { right: 3.1rem; } } + +@media (min-width: 1650px) { + div[class^='language-']::before { + right: 3.5rem; + } +}