From a528c35d1f5bfa3f6ba9b5cb6f05a54f7ed8c285 Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:16:42 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20=E4=BD=BF=E7=94=A8CSS?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=A1=A8=E6=A0=BC=E3=80=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E4=BB=A3=E7=A0=81=E5=9D=97=E3=80=81=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=B0=94=E6=B3=A1=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme.py | 57 +++----------------------------------------------------- 1 file changed, 3 insertions(+), 54 deletions(-) diff --git a/theme.py b/theme.py index 33ce4ca..14f16fb 100644 --- a/theme.py +++ b/theme.py @@ -83,63 +83,12 @@ def adjust_theme(): advanced_css = """ .markdown-body table { - margin: 1em 0; + border: 1px solid #ddd; border-collapse: collapse; - empty-cells: show; } + .markdown-body th, .markdown-body td { - border: 1.2px solid var(--border-color-primary); + border: 1px solid #ddd; padding: 5px; } -.markdown-body thead { - background-color: rgba(175,184,193,0.2); -} -.markdown-body thead th { - padding: .5em .2em; -} - -# 以下 CSS 来自对 https://github.com/GaiZhenbiao/ChuanhuChatGPT 的移植。 - -/* list */ -ol:not(.options), ul:not(.options) { - padding-inline-start: 2em !important; -} -/* 对话气泡 */ -[class *= "message"] { - border-radius: var(--radius-xl) !important; - padding: var(--spacing-xl) !important; - font-size: var(--text-md) !important; - line-height: var(--line-md) !important; - min-height: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl)); - min-width: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl)); -} -[data-testid = "bot"] { - max-width: 85%; - width: auto !important; - border-bottom-left-radius: 0 !important; -} -[data-testid = "user"] { - max-width: 85%; - width: auto !important; - border-bottom-right-radius: 0 !important; -} -/* 行内代码 */ -code { - display: inline; - white-space: break-spaces; - border-radius: 6px; - margin: 0 2px 0 2px; - padding: .2em .4em .1em .4em; - background-color: rgba(175,184,193,0.2); -} -/* 代码块 */ -pre code { - display: block; - overflow: auto; - white-space: pre; - background-color: rgba(175,184,193,0.2); - border-radius: 10px; - padding: 1em; - margin: 1em 2em 1em 0.5em; -} """ \ No newline at end of file