diff options
| -rw-r--r-- | src/doc/rust.css | 6 | ||||
| -rw-r--r-- | src/librustdoc/html/layout.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 14 |
3 files changed, 19 insertions, 5 deletions
diff --git a/src/doc/rust.css b/src/doc/rust.css index a92d4ff54db..ff18e1a8f51 100644 --- a/src/doc/rust.css +++ b/src/doc/rust.css @@ -3,30 +3,35 @@ font-style: normal; font-weight: 400; src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 500; src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Source Serif Pro'; font-style: normal; font-weight: 400; src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Source Serif Pro'; font-style: italic; font-weight: 400; src: url("SourceSerifPro-It.ttf.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Source Serif Pro'; font-style: normal; font-weight: 700; src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Source Code Pro'; @@ -35,6 +40,7 @@ /* Avoid using locally installed font because bad versions are in circulation: * see https://github.com/rust-lang/rust/issues/24355 */ src: url("SourceCodePro-Regular.woff") format('woff'); + font-display: swap; } *:not(body) { diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 86ec18775ea..ab65c71d7d1 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -83,7 +83,7 @@ crate fn render<T: Print, S: Print>( <div class=\"theme-picker\">\ <button id=\"theme-picker\" aria-label=\"Pick another theme!\" aria-haspopup=\"menu\">\ <img src=\"{static_root_path}brush{suffix}.svg\" \ - width=\"18\" \ + width=\"18\" height=\"18\" \ alt=\"Pick another theme!\">\ </button>\ <div id=\"theme-choices\" role=\"menu\"></div>\ @@ -103,7 +103,7 @@ crate fn render<T: Print, S: Print>( <button type=\"button\" class=\"help-button\">?</button> <a id=\"settings-menu\" href=\"{root_path}settings.html\">\ <img src=\"{static_root_path}wheel{suffix}.svg\" \ - width=\"18\" \ + width=\"18\" height=\"18\" \ alt=\"Change settings\">\ </a>\ </div>\ diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index e3d63fa2308..94c231cb33a 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -6,6 +6,7 @@ src: local('Fira Sans'), url("FiraSans-Regular.woff2") format("woff2"), url("FiraSans-Regular.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Fira Sans'; @@ -14,6 +15,7 @@ src: local('Fira Sans Medium'), url("FiraSans-Medium.woff2") format("woff2"), url("FiraSans-Medium.woff") format('woff'); + font-display: swap; } /* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */ @@ -22,18 +24,21 @@ font-style: normal; font-weight: 400; src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Source Serif Pro'; font-style: italic; font-weight: 400; src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Source Serif Pro'; font-style: normal; font-weight: 700; src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff'); + font-display: swap; } /* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */ @@ -44,12 +49,14 @@ /* Avoid using locally installed font because bad versions are in circulation: * see https://github.com/rust-lang/rust/issues/24355 */ src: url("SourceCodePro-Regular.woff") format('woff'); + font-display: swap; } @font-face { font-family: 'Source Code Pro'; font-style: normal; font-weight: 600; src: url("SourceCodePro-Semibold.woff") format('woff'); + font-display: swap; } * { @@ -129,7 +136,7 @@ h1, h2, h3, h4, #source-sidebar, #sidebar-toggle, /* This selector is for the items listed in the "all items" page. */ #main > ul.docblock > li > a { - font-family: "Fira Sans", sans-serif; + font-family: "Fira Sans", Arial; } .content ul.crate a.crate { @@ -475,7 +482,7 @@ h4 > code, h3 > code, .invisible > code { } #main > .since { top: inherit; - font-family: "Fira Sans", sans-serif; + font-family: "Fira Sans", Arial; } .content table:not(.table-display) { @@ -684,6 +691,7 @@ a { width: calc(100% - 63px); } #crate-search { + min-width: 115px; margin-top: 5px; padding: 6px; padding-right: 19px; @@ -1293,7 +1301,7 @@ h4 > .notable-traits { .help-button { right: 30px; - font-family: "Fira Sans",sans-serif; + font-family: "Fira Sans", Arial; text-align: center; font-size: 17px; } |
