Rollup merge of #92404 - GuillaumeGomez:src-font-size, r=jsha

Fix font size for [src] links in headers

Fixes #90384.

cc `@jsha`
r? `@camelid`
This commit is contained in:
Matthias Krüger 2022-01-06 12:01:04 +01:00 committed by GitHub
commit b510278278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 13 deletions

View File

@ -1080,8 +1080,11 @@ body.blur > :not(#help) {
.impl-items .srclink, .impl .srclink, .methods .srclink {
/* Override header settings otherwise it's too bold */
font-size: 1.0625rem;
font-weight: normal;
font-size: 1rem;
}
.impl .srclink {
font-size: 1.0625rem;
}
.rightside {

View File

@ -351,11 +351,8 @@ a.test-arrow:hover {
color: #999;
}
:target, :target > * {
background: rgba(255, 236, 164, 0.06);
}
:target {
background: rgba(255, 236, 164, 0.06);
border-right: 3px solid rgba(255, 180, 76, 0.85);
}

View File

@ -295,11 +295,8 @@ a.test-arrow:hover{
color: #999;
}
:target, :target > * {
background-color: #494a3d;
}
:target {
background-color: #494a3d;
border-right: 3px solid #bb7410;
}

View File

@ -284,11 +284,8 @@ a.test-arrow:hover{
color: #999;
}
:target, :target > * {
background: #FDFFD3;
}
:target {
background: #FDFFD3;
border-right: 3px solid #AD7C37;
}

View File

@ -0,0 +1,12 @@
// This test ensures that the "[src]" have the same font size as their headers
// to avoid having some weird height difference in the background when the element
// is selected.
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
show-text: true
// Check the impl headers.
assert-css: (".impl.has-srclink .srclink", {"font-size": "17px"}, ALL)
// The ".6" part is because the font-size is actually "1.1em".
assert-css: (".impl.has-srclink .code-header.in-band", {"font-size": "17.6px"}, ALL)
// Check the impl items.
assert-css: (".impl-items .has-srclink .srclink", {"font-size": "16px"}, ALL)
assert-css: (".impl-items .has-srclink .code-header", {"font-size": "16px"}, ALL)