mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
style/code blocks/copy button: optimize the layout
This commit is contained in:
parent
530b2adc34
commit
4ba99989e3
@ -529,10 +529,13 @@ pre:not(.hljs) {
|
|||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
:root pre {
|
||||||
|
--padding-size: 1em;
|
||||||
--copy-button-margin-size: .35em;
|
--copy-button-margin-size: .35em;
|
||||||
|
--copy-button-width: 37px;
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
padding: var(--padding-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
pre > button.copy-button {
|
pre > button.copy-button {
|
||||||
@ -541,8 +544,8 @@ pre > button.copy-button {
|
|||||||
right: var(--copy-button-margin-size);
|
right: var(--copy-button-margin-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
:root pre:has(> button.copy-button) > code {
|
:root pre:has(> button.copy-button) {
|
||||||
margin-right: calc(var(--icon-button-size) + (var(--copy-button-margin-size) * 2));
|
padding-right: calc(var(--copy-button-width) + (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