1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 01:57:20 +00:00

markup: improve code block readability and isolate copy button (#34009)

Fix #33197

Improve the rendering of code blocks in markdown content 
for better readability and UI stability across screen sizes.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
D
2025-04-19 14:53:39 +09:00
committed by GitHub
parent f0544dbfca
commit eda6d65818
5 changed files with 95 additions and 25 deletions

View File

@ -1,8 +1,3 @@
.markup .code-block,
.markup .mermaid-block {
position: relative;
}
.markup .code-copy {
position: absolute;
top: 8px;
@ -28,8 +23,8 @@
background: var(--color-secondary-dark-1) !important;
}
.markup .code-block:hover .code-copy,
.markup .mermaid-block:hover .code-copy {
.markup .code-block-container:hover .code-copy,
.markup .code-block:hover .code-copy {
visibility: visible;
animation: fadein 0.2s both;
}