mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
style/code blocks/copy button: prevent overlapping with the code block's text
This commit is contained in:
parent
75ec3934af
commit
b07ec68705
@ -530,13 +530,19 @@ pre:not(.hljs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
--copy-button-margin-size: .35em;
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre > button.copy-button {
|
pre > button.copy-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: .35em;
|
top: var(--copy-button-margin-size);
|
||||||
right: .35em;
|
right: var(--copy-button-margin-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
:root pre:has(> button.copy-button) > code {
|
||||||
|
margin-right: calc(var(--icon-button-size) + (var(--copy-button-margin-size) * 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
pre > button.copy-button:hover {
|
pre > button.copy-button:hover {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user