File tree 2 files changed +49
-1
lines changed
2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,12 @@ fn parse_rustc_date<S: AsRef<str>>(version: S) -> Result<Date<Utc>> {
43
43
/// generate this version of this crate.
44
44
pub fn get_correct_docsrs_style_file ( version : & str ) -> Result < String > {
45
45
let date = parse_rustc_date ( version) ?;
46
+ // This is the date where https://github.com/rust-lang/rust/pull/92692 was merged.
47
+ if Utc . ymd ( 2022 , 1 , 19 ) < date {
48
+ Ok ( "rustdoc-2022-01-19.css" . to_owned ( ) )
49
+ }
46
50
// This is the date where https://github.com/rust-lang/rust/pull/91356 was merged.
47
- if Utc . ymd ( 2021 , 12 , 5 ) < date {
51
+ else if Utc . ymd ( 2021 , 12 , 5 ) < date {
48
52
// If this is the new rustdoc layout, we need the newer docs.rs CSS file.
49
53
Ok ( "rustdoc-2021-12-05.css" . to_owned ( ) )
50
54
} else {
Original file line number Diff line number Diff line change
1
+ // FIXME: Use modules
2
+ @import " rustdoc-common" ;
3
+
4
+ // This file is needed to overload the previous docs.rs style. It is added into crates generated
5
+ // using rustdoc after https://github.com/rust-lang/rust/pull/92692 has been merged.
6
+
7
+ #rustdoc_body_wrapper {
8
+ padding : 0 ;
9
+
10
+ .sidebar {
11
+ margin-top : 0 ;
12
+ top : $top-navbar-height ;
13
+ height : calc (100vh - $top-navbar-height );
14
+ /* Since we use `overflow-wrap: anywhere;`, we never have the need for a X scrollbar... */
15
+ overflow-x : hidden ;
16
+
17
+ .sidebar-menu {
18
+ top : $top-navbar-height ;
19
+ }
20
+ }
21
+
22
+ main {
23
+ padding-bottom : 50px ;
24
+ }
25
+ }
26
+
27
+ div .container-rustdoc {
28
+ > .docs-rs-footer {
29
+ bottom : 0 ;
30
+ right : 0 ;
31
+ }
32
+ }
33
+
34
+ div .container-rustdoc :not (.source ) {
35
+ > .docs-rs-footer {
36
+ left : 200px ;
37
+ }
38
+ }
39
+
40
+ div .rustdoc {
41
+ #sidebar-toggle {
42
+ top : 0 ;
43
+ }
44
+ }
You can’t perform that action at this time.
0 commit comments