From 4dc184af02fa5069733a3a0266b718d5dddf4867 Mon Sep 17 00:00:00 2001 From: Jicheng Lu Date: Mon, 11 Nov 2024 00:54:36 -0600 Subject: [PATCH] relocate markdwon styles --- src/lib/scss/custom/common/_common.scss | 72 ------------------- src/lib/scss/custom/components/_markdown.scss | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/src/lib/scss/custom/common/_common.scss b/src/lib/scss/custom/common/_common.scss index 51ce695..211d44c 100644 --- a/src/lib/scss/custom/common/_common.scss +++ b/src/lib/scss/custom/common/_common.scss @@ -180,75 +180,3 @@ button:focus { .thin-scrollbar { scrollbar-width: thin; } - -.markdown-container { - overflow-x: auto; - scrollbar-width: thin; - - &:has(.language-sql), - &:has(.language-java), - &:has(.language-javascript), - &:has(.language-typescript), - &:has(.language-csharp), - &:has(.language-python), - &:has(.language-json) { - background-color: black; - color: white; - border-radius: 5px; - padding: 5px 10px; - } - - pre { - -ms-overflow-style: none !important; - white-space: pre-wrap; - margin-top: 1em; - margin-bottom: 1em; - } - - pre::-webkit-scrollbar { - display: none !important; - } - - table { - margin-top: 1em !important; - margin-bottom: 1em !important; - border-radius: 5px; - - th, td { - padding: 3px 5px !important; - } - } - - p { - margin-top: 0 !important; - margin-bottom: 0 !important; - } - - ul { - list-style-position: inside !important; - } -} - -.markdown-lite { - table { - th, td { - border: 1px solid white; - } - } - - a { - color: white; - } -} - -.markdown-dark { - table { - th, td { - border: 1px solid $primary; - } - } - - a { - color: $primary; - } -} \ No newline at end of file diff --git a/src/lib/scss/custom/components/_markdown.scss b/src/lib/scss/custom/components/_markdown.scss index 32e22b1..468f945 100644 --- a/src/lib/scss/custom/components/_markdown.scss +++ b/src/lib/scss/custom/components/_markdown.scss @@ -1,3 +1,75 @@ +.markdown-container { + overflow-x: auto; + scrollbar-width: thin; + + &:has(.language-sql), + &:has(.language-java), + &:has(.language-javascript), + &:has(.language-typescript), + &:has(.language-csharp), + &:has(.language-python), + &:has(.language-json) { + background-color: black; + color: white !important; + border-radius: 5px; + padding: 5px 10px; + } + + pre { + -ms-overflow-style: none !important; + white-space: pre-wrap; + margin-top: 1em; + margin-bottom: 1em; + } + + pre::-webkit-scrollbar { + display: none !important; + } + + table { + margin-top: 1em !important; + margin-bottom: 1em !important; + border-radius: 5px; + + th, td { + padding: 3px 5px !important; + } + } + + p { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + ul { + list-style-position: inside !important; + } +} + +.markdown-lite { + table { + th, td { + border: 1px solid white; + } + } + + a { + color: white; + } +} + +.markdown-dark { + table { + th, td { + border: 1px solid $primary; + } + } + + a { + color: $primary; + } +} + .code-block { position: relative; background-color: black;