From 5fb6618bd33c9b36c0e2195c81d350d94e915bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 15 Aug 2022 21:36:22 +0800 Subject: [PATCH] :lipstick: Use scroll to show overflow code block content. --- .../css/_common/scaffolding/highlight/copy-code.scss | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/assets/css/_common/scaffolding/highlight/copy-code.scss b/assets/css/_common/scaffolding/highlight/copy-code.scss index 97c0704..f8bb38b 100644 --- a/assets/css/_common/scaffolding/highlight/copy-code.scss +++ b/assets/css/_common/scaffolding/highlight/copy-code.scss @@ -4,6 +4,12 @@ background: var(--highlight-background); margin-bottom: 26px; + //TODO Need fixed the copy button show position. + div:first-child { + display: absolute; + overflow-x: scroll + } + pre { position: relative; } @@ -11,15 +17,15 @@ table tbody tr { //TODO Fixed the too long code line over // layout background color. - background: #272822; + background: #272822; } - pre > code span { + /* pre > code span { white-space: break-spaces; overflow: hidden; word-break: break-all; word-wrap: break-word; - } + } */ } @if $codeblock_copy_btn_enable {