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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user