diff options
| author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-05 22:20:26 -0500 |
|---|---|---|
| committer | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-14 18:20:15 -0800 |
| commit | c4b994ff80a993fb144d8ce2af6f2caf34b30347 (patch) | |
| tree | 16bedc1662f5605c7d1b6d9da7004374d73d4717 /src/librustdoc/html/static/css/rustdoc.css | |
| parent | ad46af24713115e7b9b258346e66b9b2d14eacfc (diff) | |
| download | rust-c4b994ff80a993fb144d8ce2af6f2caf34b30347.tar.gz rust-c4b994ff80a993fb144d8ce2af6f2caf34b30347.zip | |
Pick themes on settings page, not every page
This hides the paintbrush icon on most pages by default, in preference for the settings on the settings page. When loading from a local file, and not in mobile view, continue to show the theme picker. That's because some browsers limit access to localStorage from file:/// URLs, so choosing a theme from settings.html doesn't take effect.
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index d7f33d6131c..b8dd177e2d9 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1755,6 +1755,12 @@ details.rustdoc-toggle[open] > summary.hideme::after { padding-top: 0px; } + /* Space is at a premium on mobile, so remove the theme-picker icon. */ + #theme-picker { + display: none; + width: 0; + } + .rustdoc { flex-direction: column; } @@ -1873,12 +1879,6 @@ details.rustdoc-toggle[open] > summary.hideme::after { height: 100%; } - nav.sub { - width: calc(100% - 32px); - margin-left: 32px; - margin-bottom: 10px; - } - .source nav:not(.sidebar).sub { margin-left: 32px; } @@ -2075,11 +2075,6 @@ details.rustdoc-toggle[open] > summary.hideme::after { border: 0; } - #crate-search + .search-input { - width: calc(100% + 71px); - margin-left: -36px; - } - #theme-picker, #settings-menu { padding: 5px; width: 31px; |
