Improve contrast of code elements
[rnaseq-cwl-training.git] / assets / css / lesson.scss
1 ---
2 ---
3
4 //----------------------------------------
5 // Colors.
6 //----------------------------------------
7
8 // branding
9 $color-brand:       #2b3990 !default;
10
11 // code boxes
12 $color-error:       #bd2c00 !default;
13 $color-output:      #303030 !default;
14 $color-source:      #6e5494 !default;
15
16 // blockquotes
17 $color-callout:     #f4fd9c !default;
18 $color-challenge:   #eec275 !default;
19 $color-checklist:   #dfd2a0 !default;
20 $color-discussion:  #eec275 !default;
21 $color-keypoints:   #7ae78e !default;
22 $color-objectives:  #daee84 !default;
23 $color-prereq:      #9cd6dc !default;
24 $color-solution:    #ded4b9 !default;
25 $color-testimonial: #fc8dc1 !default;
26
27 //----------------------------------------
28 // Specialized code blocks.
29 //----------------------------------------
30
31 @mixin cdSetup($color) {
32     color: $color;
33     border-left: solid 5px $color;
34     margin: 15px 0;
35     border-radius: 4px 0 0 4px;
36 }
37
38 .error  { @include cdSetup($color-error); }
39 .output { @include cdSetup($color-output); }
40 .source { @include cdSetup($color-source); }
41
42 .bash, .language-bash     { @include cdSetup($color-source); }
43 .make, .language-make     { @include cdSetup($color-source); }
44 .matlab, .language-matlab { @include cdSetup($color-source); }
45 .python, .language-python { @include cdSetup($color-source); }
46 .r, .language-r           { @include cdSetup($color-source); }
47 .sql, .language-sql       { @include cdSetup($color-source); }
48
49 .error pre,
50 .output pre,
51 .source pre,
52 .bash pre,
53 .language-bash pre,
54 .make pre,
55 .language-make pre,
56 .matlab pre,
57 .language-matlab pre,
58 .python pre,
59 .language-python pre,
60 .r pre,
61 .language-r pre,
62 .sql pre ,
63 .language-sql pre {
64   border-radius: 0 4px 4px 0;
65 }
66
67 //----------------------------------------
68 // Specialized blockquote environments for learning objectives, callouts, etc.
69 //----------------------------------------
70
71 $codeblock-padding: 5px !default;
72
73 @mixin bkSetup($color, $glyph) {
74
75   $gradientcolor1: $color;
76   $gradientcolor2: scale-color($color, $lightness: 10%);
77
78   padding-left: $codeblock-padding;
79   padding-top: 0;
80   padding-bottom: 0;
81   padding-right: 0;
82   border: 1px solid;
83   border-color: $color;
84   border-radius: 4px;
85   padding-bottom: $codeblock-padding;
86
87   margin: 15px 0;
88
89   h2 {
90     padding-top: $codeblock-padding;
91     padding-bottom: $codeblock-padding;
92     font-size: 20px;
93     background: linear-gradient(to bottom, $gradientcolor1, $gradientcolor2);
94     border-color: $color;
95     margin-top: 0px;
96     margin-left: -$codeblock-padding; // to move back to the left margin of the enclosing blockquote
97   }
98   h2:before {
99     font-family: 'Glyphicons Halflings';
100     content: $glyph;
101     float: left;
102     padding-left: $codeblock-padding;
103     padding-right: $codeblock-padding;
104     display: inline-block;
105     -webkit-font-smoothing: antialiased;
106   }
107
108 }
109
110 .callout{ @include bkSetup($color-callout, "\e146"); }
111 .challenge{ @include bkSetup($color-challenge, "\270f"); }
112 .checklist{ @include bkSetup($color-checklist, "\e067"); }
113 .discussion{ @include bkSetup($color-discussion, "\e123"); }
114 .keypoints{ @include bkSetup($color-keypoints, "\e101"); }
115 .objectives{ @include bkSetup($color-objectives, "\e085"); }
116 .prereq{ @include bkSetup($color-prereq, "\e124"); }
117 .solution{ @include bkSetup($color-solution, "\e105"); }
118 .testimonial{ @include bkSetup($color-testimonial, "\e143"); }
119
120 .callout h3,
121 .challenge h3,
122 .checklist h3,
123 .discussion h3,
124 .keypoints h3,
125 .objectives h3,
126 .prereq h3,
127 .solution h3,
128 .testimonial h3 {
129 font-size: 18px;
130 }
131
132 .challenge    { background-color: #eec27520; }
133 .callout      { background-color: #f4fd9c20; }
134 .challenge    { background-color: #eec27520; }
135 .checklist    { background-color: #dfd2a020; }
136 .discussion   { background-color: #eec27520; }
137 .keypoints    { background-color: #7ae78e20; }
138 .objectives   { background-color: #daee8420; }
139 .prereq       { background-color: #9cd6dc20; }
140 .solution     { background-color: #ded4b94d; }
141 .testimonial  { background-color: #fc8dc120; }
142
143 blockquote p {
144     margin: 5px;
145 }
146
147 //----------------------------------------
148 // Override Bootstrap settings.
149 //----------------------------------------
150
151 code {
152   white-space: nowrap;
153   padding: 2px 5px;
154   color: #006cad;
155   background-color: #e7e7e7;
156 }
157
158 article img {
159     display: block;
160     margin: 20px auto;
161     max-width: 100%;
162 }
163
164 article h2 {
165   margin: 48px 0 16px;
166   border-bottom: solid 1px #eaecef;
167   padding-bottom: 0.3em;
168   line-height: 1.25;
169 }
170
171 article h3 { margin: 40px 0 16px; }
172
173 //----------------------------------------
174 // Miscellaneous.
175 //----------------------------------------
176
177 .figures h2 { margin-top: 100px; }
178
179 .maintitle {
180   text-align: center;
181 }
182
183 .footertext {
184   text-align: center;
185 }
186
187 footer .copyright,
188 footer .help-links
189 {
190     font-size: inherit;
191     margin-top: 10px;
192     margin-bottom: 10px;
193     font-weight: 500;
194     line-height: 1.1;
195 }
196
197 img.navbar-logo {
198   height: 40px; // synchronize with height of navbar
199   padding-top: 5px;
200   padding-right: 10px;
201 }
202
203 div.branding {
204   color: $color-brand;
205 }
206
207 ul,
208 ol {
209   padding-left: 2em;
210 }
211
212 span.fold-unfold {
213   margin-left: 1em;
214   opacity: 0.5;
215 }
216
217
218 //----------------------------------------
219 // Life cycle box
220 //----------------------------------------
221
222 div.life-cycle {
223     position: -webkit-sticky; /* Safari */
224     position: sticky;
225     top: 0;
226     z-index: 100;
227     font-size: 1.2em;
228     text-align: center;
229     margin-bottom: -1px;
230     border-radius: 0;
231 }
232
233 .pre-alpha {
234     color: #a94442;
235     background: #f2dede;
236 }
237
238 .alpha {
239     color: #8a6d3b;
240     background: #fcf8e3;
241 }
242
243 .beta {
244     color: #31708f;
245     background: #d9edf7;
246 }
247
248
249 //----------------------------------------
250 // keyboard key style, from StackExchange.
251 //----------------------------------------
252
253 kbd {
254     display: inline-block;
255     margin: 0 .1em;
256     padding: .1em .6em;
257     font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
258     font-size: 11px;
259     line-height: 1.4;
260     color: #242729;
261     text-shadow: 0 1px 0 #FFF;
262     background-color: #e1e3e5;
263     border: 1px solid #adb3b9;
264     border-radius: 3px;
265     box-shadow: 0 1px 0 rgba(12,13,14,0.2), 0 0 0 2px #FFF inset;
266     white-space: nowrap;
267     font-style: normal;
268 }