Correctly handle code examples buttons position
This commit is contained in:
parent
4825fb198f
commit
5a85632623
2 changed files with 26 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
|
|||
</g></svg>');
|
||||
--button-left-margin: 4px;
|
||||
--button-border-radius: 2px;
|
||||
--pre-line-height: 1.5rem;
|
||||
}
|
||||
|
||||
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
|
||||
|
|
@ -365,7 +366,7 @@ code, pre, .code-header {
|
|||
}
|
||||
pre {
|
||||
padding: 14px;
|
||||
line-height: 1.5; /* https://github.com/rust-lang/rust/issues/105906 */
|
||||
line-height: var(--pre-line-height); /* https://github.com/rust-lang/rust/issues/105906 */
|
||||
}
|
||||
pre.item-decl {
|
||||
overflow-x: auto;
|
||||
|
|
@ -2278,6 +2279,9 @@ in src-script.js and main.js
|
|||
/* Dirty hacky to force it to remain on the same line as the line numbers. */
|
||||
width: 10px;
|
||||
}
|
||||
.example-wrap.scraped-example .button-holder {
|
||||
top: calc(var(--pre-line-height) + 4px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Should have min-width: (N + 1)px where N is the mobile breakpoint above. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue