rustdoc: tweak spacing in toolbar
This commit is contained in:
parent
5b1b2e97e3
commit
df307d0085
@ -34,6 +34,8 @@ xmlns="http://www.w3.org/2000/svg" fill="black" height="18px">\
|
||||
</g></svg>');
|
||||
--button-left-margin: 4px;
|
||||
--button-border-radius: 2px;
|
||||
--toolbar-button-border-radius: 6px;
|
||||
--code-block-border-radius: 6px;
|
||||
}
|
||||
|
||||
/* See FiraSans-LICENSE.txt for the Fira Sans license. */
|
||||
@ -183,7 +185,7 @@ h1, h2, h3, h4 {
|
||||
grid-template-columns: 1fr max-content;
|
||||
grid-template-rows: 25px min-content min-content;
|
||||
padding-bottom: 6px;
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
.rustdoc-breadcrumbs {
|
||||
grid-area: main-heading-breadcrumbs;
|
||||
@ -904,6 +906,7 @@ both the code example and the line numbers, so we need to remove the radius in t
|
||||
flex-grow: 0;
|
||||
grid-area: main-heading-sub-heading;
|
||||
line-height: 1.25;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.main-heading rustdoc-toolbar, .main-heading .out-of-band {
|
||||
@ -918,6 +921,7 @@ rustdoc-toolbar {
|
||||
.docblock code, .docblock-short code,
|
||||
pre, .rustdoc.src .example-wrap {
|
||||
background-color: var(--code-block-background-color);
|
||||
border-radius: var(--code-block-border-radius);
|
||||
}
|
||||
|
||||
#main-content {
|
||||
@ -1315,14 +1319,14 @@ so that we can apply CSS-filters to change the arrow color in themes */
|
||||
|
||||
#settings.popover {
|
||||
--popover-arrow-offset: 202px;
|
||||
top: calc(100% - 12px);
|
||||
top: calc(100% - 16px);
|
||||
}
|
||||
|
||||
/* use larger max-width for help popover, but not for help.html */
|
||||
#help.popover {
|
||||
max-width: 600px;
|
||||
--popover-arrow-offset: 118px;
|
||||
top: calc(100% - 12px);
|
||||
top: calc(100% - 16px);
|
||||
}
|
||||
|
||||
#help dt {
|
||||
@ -1838,6 +1842,7 @@ a.tooltip:hover::after {
|
||||
}
|
||||
#settings-menu > a, #help-button > a, button#toggle-all-docs {
|
||||
width: 80px;
|
||||
border-radius: var(--toolbar-button-border-radius);
|
||||
}
|
||||
#sidebar-button > a {
|
||||
background-color: var(--button-background-color);
|
||||
@ -1924,6 +1929,7 @@ button[disabled]#toggle-all-docs:hover {
|
||||
rustdoc-toolbar span.label {
|
||||
font-size: 1rem;
|
||||
flex-grow: 1;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
#sidebar-button > a:before {
|
||||
|
@ -20,7 +20,7 @@ store-position: (
|
||||
{"x": second_line_x, "y": second_line_y},
|
||||
)
|
||||
assert: |first_line_x| != |second_line_x| && |first_line_x| == 516 && |second_line_x| == 272
|
||||
assert: |first_line_y| != |second_line_y| && |first_line_y| == 710 && |second_line_y| == 733
|
||||
assert: |first_line_y| != |second_line_y| && |first_line_y| == 714 && |second_line_y| == 737
|
||||
|
||||
// Now we ensure that they're not rendered on the same line.
|
||||
set-window-size: (1100, 800)
|
||||
|
@ -72,8 +72,8 @@ click: ".scraped-example .button-holder .expand"
|
||||
store-value: (offset_y, 4)
|
||||
|
||||
// First with desktop
|
||||
assert-position: (".scraped-example", {"y": 248})
|
||||
assert-position: (".scraped-example .prev", {"y": 248 + |offset_y|})
|
||||
assert-position: (".scraped-example", {"y": 252})
|
||||
assert-position: (".scraped-example .prev", {"y": 252 + |offset_y|})
|
||||
|
||||
// Gradient background should be at the top of the code block.
|
||||
assert-css: (".scraped-example .example-wrap::before", {"top": "0px"})
|
||||
@ -82,8 +82,8 @@ assert-css: (".scraped-example .example-wrap::after", {"bottom": "0px"})
|
||||
// Then with mobile
|
||||
set-window-size: (600, 600)
|
||||
store-size: (".scraped-example .scraped-example-title", {"height": title_height})
|
||||
assert-position: (".scraped-example", {"y": 277})
|
||||
assert-position: (".scraped-example .prev", {"y": 277 + |offset_y| + |title_height|})
|
||||
assert-position: (".scraped-example", {"y": 281})
|
||||
assert-position: (".scraped-example .prev", {"y": 281 + |offset_y| + |title_height|})
|
||||
|
||||
define-function: (
|
||||
"check_title_and_code_position",
|
||||
|
Loading…
Reference in New Issue
Block a user