]> git.lizzy.rs Git - rust.git/blob - src/rustbook/css.rs
Rollup merge of #25614 - parir:patch-2, r=alexcrichton
[rust.git] / src / rustbook / css.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // The rust-book CSS in string form.
12
13 pub static STYLE: &'static str = r#"
14 @import url("../rust.css");
15
16 body {
17     max-width:none;
18 }
19
20 @media only screen {
21     #toc {
22         position: absolute;
23         left: 0px;
24         top: 0px;
25         bottom: 0px;
26         width: 250px;
27         overflow-y: auto;
28         border-right: 1px solid rgba(0, 0, 0, 0.07);
29         padding: 10px 10px;
30         font-size: 16px;
31         background: none repeat scroll 0% 0% #FFF;
32         box-sizing: border-box;
33         -webkit-overflow-scrolling: touch;
34     }
35
36     #page-wrapper {
37         position: absolute;
38         overflow-y: auto;
39         left: 260px;
40         right: 0px;
41         top: 0px;
42         bottom: 0px;
43         box-sizing: border-box;
44         background: none repeat scroll 0% 0% #FFF;
45         -webkit-overflow-scrolling: touch;
46     }
47 }
48
49 @media only print {
50     #toc, #nav {
51         display: none;
52     }
53 }
54
55 @media only screen and (max-width: 1060px) {
56     #toc {
57         width: 100%;
58         margin-right: 0;
59         top: 40px;
60     }
61     #page-wrapper {
62         top: 40px;
63         left: 15px;
64         padding-right: 15px;
65     }
66     .mobile-hidden {
67         display: none;
68     }
69 }
70
71 #page {
72     margin-left: auto;
73     margin-right:auto;
74     max-width: 750px;
75     padding-bottom: 50px;
76 }
77
78 .chapter {
79     list-style: none outside none;
80     padding-left: 0px;
81     line-height: 30px;
82 }
83
84 .section {
85     list-style: none outside none;
86     padding-left: 20px;
87     line-height: 30px;
88 }
89
90 .section li {
91     text-overflow: ellipsis;
92     overflow: hidden;
93     white-space: nowrap;
94 }
95
96 .chapter li a {
97     color: #000000;
98 }
99
100 .chapter li a.active {
101     text-decoration: underline;
102     font-weight: bold;
103 }
104
105 #toggle-nav {
106     height: 20px;
107     width:  30px;
108     padding: 3px 3px 0 3px;
109 }
110
111 #toggle-nav {
112     margin-top: 5px;
113     width: 30px;
114     height: 30px;
115     background-color: #FFF;
116     border: 1px solid #666;
117     border-radius: 3px 3px 3px 3px;
118 }
119
120 .sr-only {
121     position: absolute;
122     width: 1px;
123     height: 1px;
124     margin: -1px;
125     padding: 0;
126     overflow: hidden;
127     clip: rect(0, 0, 0, 0);
128     border: 0;
129 }
130
131 .bar {
132     display: block;
133     background-color: #000;
134     border-radius: 2px;
135     width: 100%;
136     height: 2px;
137     margin: 2px 0 3px;
138     padding: 0;
139 }
140
141 .left {
142     float: left;
143 }
144
145 .right {
146     float: right;
147 }
148 "#;