diff --git a/lib/default-theme/styles/code.styl b/lib/default-theme/styles/code.styl index 3c6c3fb45c..71fe8770d8 100644 --- a/lib/default-theme/styles/code.styl +++ b/lib/default-theme/styles/code.styl @@ -92,40 +92,28 @@ div[class*="language-"] border-right 1px solid rgba(0, 0, 0, 66%) background-color $codeBgColor -div[class*="language-js"], div[class*="language-javascript"] + +for lang in js ts html md vue css sass scss less stylus go java c sh yaml + div{'[class*="language-' + lang + '"]'} + &:before + content ('' + lang) + +div[class*="language-javascript"] &:before content "js" -div[class*="language-ts"], div[class*="language-typescript"] +div[class*="language-typescript"] &:before content "ts" -div[class*="language-html"], div[class*="language-markup"] +div[class*="language-markup"] &:before content "html" -div[class*="language-markdown"], div[class*="language-md"] +div[class*="language-markdown"] &:before content "md" -div[class*="language-vue"]:before - content "vue" - -div[class*="language-css"]:before - content "css" - -div[class*="language-sass"]:before - content "sass" - -div[class*="language-less"]:before - content "less" - -div[class*="language-scss"]:before - content "scss" - -div[class*="language-stylus"]:before - content "stylus" - div[class*="language-json"]:before content "json" @@ -135,17 +123,5 @@ div[class*="language-ruby"]:before div[class*="language-python"]:before content "py" -div[class*="language-go"]:before - content "go" - -div[class*="language-java"]:before - content "java" - -div[class*="language-c"]:before - content "c" - div[class*="language-bash"]:before content "sh" - -div[class*="language-yaml"]:before - content "yaml"