This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/test by this push:
     new 84cc97dc fix: pre tag background color adjustment, remove the 
background color of the quoted content
84cc97dc is described below

commit 84cc97dc783116f17aac5e6ca7e83becb5e006c0
Author: shuai <[email protected]>
AuthorDate: Fri May 23 15:05:15 2025 +0800

    fix: pre tag background color adjustment, remove the background color of 
the quoted content
---
 ui/src/components/Editor/Viewer.tsx | 2 +-
 ui/src/index.scss                   | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ui/src/components/Editor/Viewer.tsx 
b/ui/src/components/Editor/Viewer.tsx
index 3f41831d..58187a03 100644
--- a/ui/src/components/Editor/Viewer.tsx
+++ b/ui/src/components/Editor/Viewer.tsx
@@ -78,7 +78,7 @@ const Index = ({ value }, ref) => {
     <ImgViewer>
       <div
         ref={previewRef}
-        className="preview-wrap position-relative p-3 bg-light rounded 
text-break text-wrap mt-2 fmt"
+        className="preview-wrap position-relative p-3 rounded text-break 
text-wrap mt-2 fmt"
         dangerouslySetInnerHTML={{ __html: html }}
       />
     </ImgViewer>
diff --git a/ui/src/index.scss b/ui/src/index.scss
index 279dbf8e..97aa7b1f 100644
--- a/ui/src/index.scss
+++ b/ui/src/index.scss
@@ -247,17 +247,16 @@ img[src=''] {
     }
   }
   pre {
-    background-color: var(--an-e9ecef);
+    background-color: var(--bs-gray-100);
     border-radius: 0.25rem;
     padding: 1rem;
     max-height: 38rem;
-    white-space: normal;
+    white-space: pre-wrap;
   }
   blockquote {
     border-left: 0.25rem solid #ced4da;
     padding: 1rem;
     color: #6c757d;
-    background-color: var(--an-e9ecef);
     p {
       color: var(--bs-body-color);
     }

Reply via email to