Skip to content

Commit 03e704d

Browse files
committed
Moar styling
1 parent 7da299d commit 03e704d

File tree

4 files changed

+45
-43
lines changed

4 files changed

+45
-43
lines changed

Diff for: source/layouts/layout.erb

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ under the License.
2020
<meta charset="utf-8">
2121
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
2222
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
23-
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
2423
<title><%= current_page.data.title || "API Documentation" %></title>
2524

2625
<%= stylesheet_link_tag :screen, media: :screen %>

Diff for: source/stylesheets/_syntax.scss.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ under the License.
2222
color: #909090;
2323
}
2424

25-
.highlight, .highlight .w {
25+
.highlight code, .highlight .w {
2626
background-color: $code-bg;
27-
}
27+
}

Diff for: source/stylesheets/_variables.scss

+5-7
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ under the License.
2525
////////////////////
2626
$nav-bg: #f7f7f7;
2727
$examples-bg: #393939;
28-
$code-bg: #3c3c3c;
29-
$code-annotation-bg: #1c1c1c;
28+
$code-bg: #292929;
3029
$nav-subitem-bg: #f7f7f7;
31-
$nav-active-bg: #f7f7f7;
30+
$nav-active-bg: #9B5C8F;
3231
$lang-select-border: #000;
3332
$lang-select-bg: #222;
3433
$lang-select-active-bg: $examples-bg; // feel free to change this to blue or something
3534
$lang-select-pressed-bg: #111; // color of language tab bg when mouse is pressed
3635
$main-bg: #ffffff;
37-
$aside-notice-bg: #8fbcd4;
36+
$aside-notice-bg: #9B5C8F;
3837
$aside-warning-bg: #c97a7e;
3938
$aside-success-bg: #6ac174;
4039
$search-notice-bg: #c97a7e;
@@ -45,7 +44,7 @@ $link-color: #804877;
4544
////////////////////
4645
$main-text: #333; // main content text color
4746
$nav-text: #3c3c3c;
48-
$nav-active-text: #804877;
47+
$nav-active-text: #fff;
4948
$lang-select-text: #fff; // color of unselected language tab text
5049
$lang-select-active-text: #fff; // color of selected language tab text
5150
$lang-select-pressed-text: #fff; // color of language tab text when mouse is pressed
@@ -59,7 +58,6 @@ $logo-margin: 20px; // margin between nav items and logo, ignored if search is a
5958
$main-padding: 28px; // padding to left and right of content & examples
6059
$nav-padding: 20px; // padding to left and right of navbar
6160
$nav-v-padding: 10px; // padding used vertically around search boxes and results
62-
$code-annotation-padding: 20px; // padding inside code annotations
6361
$h1-margin-bottom: 21px; // padding under the largest header tags
6462
$tablet-width: 930px; // min width before reverting to tablet size
6563
$phone-width: $tablet-width - $nav-width; // min width before reverting to mobile size
@@ -68,7 +66,7 @@ $phone-width: $tablet-width - $nav-width; // min width before reverting to mobil
6866
// FONTS
6967
////////////////////
7068
%default-font {
71-
font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif;
69+
font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif;
7270
font-size: 13px;
7371
}
7472

Diff for: source/stylesheets/screen.css.scss

+38-33
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ html, body {
7676
// This is the logo at the top of the ToC
7777
.logo-wrapper {
7878
padding: 10px 20px;
79-
margin: 0 0 10px;
79+
margin: 0;
8080
display: block;
8181
border-bottom: 1px solid #ddd;
8282

@@ -91,7 +91,8 @@ html, body {
9191
}
9292

9393
.tocify-item>a, .toc-footer li {
94-
padding: 0 $nav-padding 0 $nav-padding;
94+
padding: 10px $nav-padding;
95+
line-height: 1;
9596
display: block;
9697
overflow-x: hidden;
9798
white-space: nowrap;
@@ -115,11 +116,18 @@ html, body {
115116
transition-duration: 230ms;
116117
}
117118

119+
a:hover {
120+
text-decoration: underline;
121+
}
122+
118123
// This is the currently selected ToC entry
119124
.tocify-focus {
120-
box-shadow: 0px 1px 0px $nav-active-shadow;
125+
//box-shadow: 0px 1px 0px $nav-active-shadow;
121126
background-color: $nav-active-bg;
122127
color: $nav-active-text;
128+
a:hover {
129+
text-decoration: none;
130+
}
123131
}
124132

125133
// Subheaders are the submenus that slide open
@@ -140,9 +148,9 @@ html, body {
140148
}
141149

142150
.toc-footer {
143-
padding: 1em 0;
144-
margin-top: 1em;
145-
border-top: 1px dashed $nav-footer-border-color;
151+
padding: 10px 0;
152+
margin-top: 10px;
153+
border-top: 1px solid #ddd;
146154

147155
li,a {
148156
color: $nav-text;
@@ -155,7 +163,6 @@ html, body {
155163

156164
li {
157165
font-size: 0.8em;
158-
line-height: 28px;
159166
text-decoration: none;
160167
}
161168
}
@@ -239,18 +246,21 @@ html, body {
239246
float:left;
240247
color: $lang-select-text;
241248
text-decoration: none;
242-
padding: 0 10px;
243-
line-height: 30px;
249+
padding: 10px 20px;
250+
line-height: 40px;
244251
outline: 0;
252+
border-top: 4px solid $lang-select-bg;;
245253

246254
&:active, &:focus {
247255
background-color: $lang-select-pressed-bg;
248256
color: $lang-select-pressed-text;
257+
border-top-color: #9B5C8F;
249258
}
250259

251260
&.active {
252261
background-color: $lang-select-active-bg;
253262
color: $lang-select-active-text;
263+
border-top-color: #9B5C8F;
254264
}
255265
}
256266

@@ -270,7 +280,7 @@ html, body {
270280
// to place content above the dark box
271281
position: relative;
272282
z-index: 30;
273-
padding-top: 44px;
283+
padding-top: 40px;
274284

275285
&:after {
276286
content: '';
@@ -298,7 +308,7 @@ html, body {
298308

299309
h1 {
300310
@extend %header-font;
301-
font-size: 26px;
311+
font-size: 30px;
302312
margin-top: 4em;
303313
margin-bottom: 20px;
304314
padding-top: 20px;
@@ -314,8 +324,9 @@ html, body {
314324
h2 {
315325
@extend %header-font;
316326
font-size: 20px;
317-
margin-top: 4em;
318-
margin-bottom: 0;
327+
margin-top: 40px;
328+
padding-top: 40px;
329+
margin-bottom: 20px;
319330
}
320331

321332
// h2s right after h1s should bump right up
@@ -407,20 +418,23 @@ html, body {
407418
aside {
408419
padding-top: 1em;
409420
padding-bottom: 1em;
410-
@include text-shadow(0 1px 0 lighten($aside-notice-bg, 15%));
421+
@include text-shadow(0 1px 0 darken($aside-notice-bg, 15%));
411422
margin-top: 1.5em;
412423
margin-bottom: 1.5em;
413424
background: $aside-notice-bg;
414425
line-height: 1.6;
426+
color: lighten($aside-notice-bg, 80%);
415427

416428
&.warning {
417429
background-color: $aside-warning-bg;
418430
@include text-shadow(0 1px 0 lighten($aside-warning-bg, 15%));
431+
color: #333;
419432
}
420433

421434
&.success {
422435
background-color: $aside-success-bg;
423436
@include text-shadow(0 1px 0 lighten($aside-success-bg, 15%));
437+
color: #333;
424438
}
425439
}
426440

@@ -459,20 +473,14 @@ html, body {
459473

460474
.content {
461475
pre, blockquote {
462-
background-color: $code-bg;
463476
color: #fff;
464-
465-
padding: 2em $main-padding;
466-
margin: 0;
467-
width: $examples-width;
468-
477+
margin: 0 0 20px;
478+
@extend %right-col;
479+
box-sizing: border-box;
469480
float:right;
470481
clear:right;
471-
472-
box-sizing: border-box;
473-
@include text-shadow(0px 1px 2px rgba(0,0,0,0.4));
474-
475-
@extend %right-col;
482+
width: $examples-width;
483+
padding: 0 20px;
476484

477485
&>p { margin: 0; }
478486

@@ -485,16 +493,13 @@ html, body {
485493

486494
pre {
487495
@extend %code-font;
488-
}
496+
background: $examples-bg;
489497

490-
blockquote {
491-
&>p {
492-
background-color: $code-annotation-bg;
498+
code {
499+
padding: 20px;
493500
border-radius: 5px;
494-
padding: $code-annotation-padding;
495-
color: #ccc;
496-
border-top: 1px solid #000;
497-
border-bottom: 1px solid #404040;
501+
display: block;
502+
background-color: $code-bg;
498503
}
499504
}
500505
}

0 commit comments

Comments
 (0)