Commit 1030376e authored by Robert Lord's avatar Robert Lord

More style fixes and changes

parent f7e6117e
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<!-- Use title if it's in the page YAML frontmatter --> <!-- Use title if it's in the page YAML frontmatter -->
<title><%= current_page.data.title || "API Documentation" %></title> <title><%= current_page.data.title || "API Documentation" %></title>
<%= stylesheet_link_tag "normalize", "all", "syntax" %> <%= stylesheet_link_tag "all" %>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<%= javascript_include_tag "all" %> <%= javascript_include_tag "all" %>
......
@charset "utf-8"; @charset "utf-8";
@import 'normalize';
@import 'compass'; @import 'compass';
@import 'variables'; @import 'variables';
@import 'syntax';
/* /*
* jquery.tocify.css 1.7.0 * jquery.tocify.css 1.7.0
...@@ -24,11 +26,11 @@ html, body { ...@@ -24,11 +26,11 @@ html, body {
z-index: 10; z-index: 10;
background-color: $main-bg; background-color: $main-bg;
padding: 1px 0; // prevent headers margin from overflowing padding-bottom: 1px; // prevent margin overflow
.dark-box { .dark-box {
width: $examples-width; width: $examples-width;
background: $examples-bg; background-color: $examples-bg;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
...@@ -41,28 +43,29 @@ html, body { ...@@ -41,28 +43,29 @@ html, body {
z-index: 50; z-index: 50;
font-weight: bold; font-weight: bold;
background-color: $lang-select-bg; background-color: $lang-select-bg;
@include background-image(linear-gradient(top, #1d82c6, #1864ab)); // @include background-image(linear-gradient(top, #1d82c6, #1864ab));
border-bottom: 1px solid #000; border-bottom: 5px solid $examples-bg;
// box-shadow: 0 10px 5px $code-bg;
a { a {
background-color: $lang-select-bg; // background-color: $lang-select-bg;
display: block; display: block;
float:left; float:left;
color: $lang-select-text; color: $lang-select-text;
text-decoration: none; text-decoration: none;
padding: 0 10px; padding: 0 10px;
border-right: 1px solid $lang-select-border; // border-right: 1px solid $lang-select-border;
line-height: 30px; line-height: 30px;
@include background-image(linear-gradient(top, #1d82c6, #1864ab));
&:active, &.active { &.active {
background-color: $examples-bg; background-color: $examples-bg;
border-top: 1px solid $examples-bg; top: 1px;
border-right-color: $examples-bg;
margin-bottom: -1px;
background-image: none;
position: relative;
z-index: 70; z-index: 70;
} }
&:active {
background-color: #000;
border-color: #000;
}
} }
&:after { &:after {
...@@ -87,12 +90,15 @@ html, body { ...@@ -87,12 +90,15 @@ html, body {
background-color: rgba(0,0,0,0.05); background-color: rgba(0,0,0,0.05);
padding: 3px; padding: 3px;
border-radius: 3px; border-radius: 3px;
@include break-words;
} }
&>h1, &>h2, &>h3, &>p, &>table, &>ul, &>ol { &>h1, &>h2, &>h3, &>p, &>table, &>ul, &>ol {
margin-right: $examples-width; margin-right: $examples-width;
@include box-sizing(border-box); }
&>h1, &>h2, &>h3, &>p, &>table, &>ul, &>ol {
padding: 0 $main-padding; padding: 0 $main-padding;
@include box-sizing(border-box);
display: block; display: block;
@include embedded-text; @include embedded-text;
} }
...@@ -120,9 +126,8 @@ html, body { ...@@ -120,9 +126,8 @@ html, body {
th { th {
padding: 5px 10px; padding: 5px 10px;
border-bottom: 1px solid #999; border-bottom: 1px solid #ccc;
vertical-align: bottom; vertical-align: bottom;
max-width: 100%;
} }
td { td {
...@@ -130,14 +135,14 @@ html, body { ...@@ -130,14 +135,14 @@ html, body {
} }
tr:last-child { tr:last-child {
border-bottom: 1px solid #999; border-bottom: 1px solid #ccc;
} }
tr:nth-child(even)>td { tr:nth-child(odd)>td {
background-color: lighten($main-bg,4.2%); background-color: lighten($main-bg,4.2%);
} }
tr:nth-child(odd)>td { tr:nth-child(even)>td {
background-color: lighten($main-bg,2.4%); background-color: lighten($main-bg,2.4%);
} }
} }
...@@ -158,15 +163,15 @@ html, body { ...@@ -158,15 +163,15 @@ html, body {
h2 { h2 {
font-size: 20px; font-size: 20px;
margin-top: 2em; margin-top: 4em;
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 1.2em; padding-bottom: 1.2em;
@include background-image(linear-gradient(top, rgba(#fff,0.4), rgba(#fff, 0)));
} }
h2, h1 + p, h1 + table, h1 + ul, h1 + ol { h2, h1 + p, h1 + table, h1 + ul, h1 + ol {
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
padding-top: 1.2em; padding-top: 1.2em;
@include background-image(linear-gradient(top, rgba(#fff,0.75), rgba(#fff, 0)));
} }
h1 + h2, h1 + div + h2 { h1 + h2, h1 + div + h2 {
...@@ -189,16 +194,20 @@ html, body { ...@@ -189,16 +194,20 @@ html, body {
margin-top: 0; margin-top: 0;
} }
img {
max-width: 100%;
}
pre, blockquote { pre, blockquote {
background-color: $code-bg;
float:right; float:right;
width: $examples-width; width: $examples-width;
clear:right; clear:right;
@include box-sizing(border-box); @include box-sizing(border-box);
padding: 0 $main-padding;
margin: 0; margin: 0;
color: #fff; color: #fff;
@include text-shadow(0px 1px 2px rgba(0,0,0,0.4)); @include text-shadow(0px 1px 2px rgba(0,0,0,0.4));
padding: $main-padding/2 $main-padding; padding: 2em $main-padding;
&>p { margin: 0; } &>p { margin: 0; }
a { a {
color: #fff; color: #fff;
...@@ -207,10 +216,15 @@ html, body { ...@@ -207,10 +216,15 @@ html, body {
} }
} }
pre { blockquote {
background-color: $code-bg; &>p {
@include fancy-inset-border-top; background-color: $code-annotation-bg;
@include fancy-inset-border-bottom; border-radius: 5px;
padding: $code-annotation-padding;
color: #ccc;
@include fancy-inset-border-top;
@include fancy-inset-border-bottom;
}
} }
} }
...@@ -229,6 +243,7 @@ html, body { ...@@ -229,6 +243,7 @@ html, body {
font-weight: bold; font-weight: bold;
&>img { &>img {
background-color: #f29a3c;
display: block; display: block;
margin-bottom: $logo-margin; margin-bottom: $logo-margin;
} }
...@@ -240,7 +255,7 @@ html, body { ...@@ -240,7 +255,7 @@ html, body {
overflow-x:hidden; overflow-x:hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
@include text-shadow(0px -1px 1px rgba(0,0,0,0.5)); // @include text-shadow(0px 0px 3px rgba(0,0,0,0.7));
} }
/* The Table of Contents is composed of multiple nested unordered lists. These styles remove the default styling of an unordered list because it is ugly. */ /* The Table of Contents is composed of multiple nested unordered lists. These styles remove the default styling of an unordered list because it is ugly. */
...@@ -252,7 +267,6 @@ html, body { ...@@ -252,7 +267,6 @@ html, body {
} }
.tocify li { .tocify li {
background-color: rgba(#1d82c6,0);
color: #fff; color: #fff;
@include transition-property('background'); @include transition-property('background');
@include transition-timing-function('linear'); @include transition-timing-function('linear');
...@@ -262,7 +276,9 @@ html, body { ...@@ -262,7 +276,9 @@ html, body {
.tocify .tocify-focus { .tocify .tocify-focus {
@include box-shadow(0px 1px 0px #000); @include box-shadow(0px 1px 0px #000);
// @include background-image(linear-gradient(top, #1d82c6, #1864ab)); // @include background-image(linear-gradient(top, #1d82c6, #1864ab));
background-color: rgba(#1d82c6,1); // background-color: #1d82c6;
background-color: $nav-select-bg;
color: #fff;
} }
/* Top level header elements */ /* Top level header elements */
......
<%= Rouge::Themes::Base16::Monokai.render(:scope => '.highlight') %> <%= Rouge::Themes::Base16::Monokai.render(:scope => '.highlight') %>
@import 'variables';
.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { .highlight .c, .highlight .cm, .highlight .c1, .highlight .cs {
color: #909090; color: #909090;
}
.highlight, .highlight .w {
background-color: $code-bg;
} }
\ No newline at end of file
...@@ -2,19 +2,21 @@ ...@@ -2,19 +2,21 @@
$nav-width: 230px; $nav-width: 230px;
// default padding of the navbar // default padding of the navbar
$nav-padding: 20px; $nav-padding: 15px;
// background colors // background colors
$nav-bg: #393939; $nav-bg: #393939;
$examples-bg: #393939; $examples-bg: #393939;
$code-bg: #262626; $code-bg: #292929;
$code-annotation-bg: #1c1c1c;
$nav-subitem-bg: #262626; $nav-subitem-bg: #262626;
$lang-select-bg: #1d82c6; $nav-select-bg: #2467af;
$lang-select-hover-bg: #175fa1; $lang-select-border: #000;
$lang-select-bg: #222222;
$main-bg: #eaf2f6; $main-bg: #eaf2f6;
// border colors // border colors
$lang-select-border: #113a6f; // $lang-select-border: #113a6f;
// text colors // text colors
// $nav-bg: #393939; // $nav-bg: #393939;
...@@ -23,13 +25,15 @@ $lang-select-border: #113a6f; ...@@ -23,13 +25,15 @@ $lang-select-border: #113a6f;
// $nav-subitem-bg: #262626; // $nav-subitem-bg: #262626;
$lang-select-text: #fff; $lang-select-text: #fff;
$examples-width: 45%; $examples-width: 50%;
$code-annotation-padding: 13px;
// indentation amount for sub-items // indentation amount for sub-items
$nav-indent: 10px; $nav-indent: 10px;
// padding to the left of the main content, to the right of the navbar // padding to the left of the main content, to the right of the navbar
$main-padding: 40px; $main-padding: 28px;
// primary text color // primary text color
$main-text-color: #333; $main-text-color: #333;
...@@ -38,7 +42,7 @@ $main-text-color: #333; ...@@ -38,7 +42,7 @@ $main-text-color: #333;
$line-color: #cfcfcf; $line-color: #cfcfcf;
// margin between nav items and logo // margin between nav items and logo
$logo-margin: 0px; $logo-margin: 20px;
// these are for the code blocks on the right, and the // these are for the code blocks on the right, and the
...@@ -54,4 +58,17 @@ $logo-margin: 0px; ...@@ -54,4 +58,17 @@ $logo-margin: 0px;
@mixin embedded-text($opacity: 1) { @mixin embedded-text($opacity: 1) {
@include text-shadow(0px 1px 0px rgba(#fff,$opacity)); @include text-shadow(0px 1px 0px rgba(#fff,$opacity));
}
@mixin break-words {
-ms-word-break: break-all;
word-break: break-all;
/* Non standard for webkit */
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment