blob: adfc9a53ab82aa330e7a4f7f1c75a91027d2f810 [file] [log] [blame]
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro|Source+Sans+Pro&display=swap');
$monospace: 'Source Code Pro', Menlo, Consolas, monospace;
$sans: 'Source Sans Pro', sans-serif;
a {
color: #C00;
text-decoration: none;
border-bottom: dashed 1px #C00;
}
a:visited {
color: #a30000;
border-bottom: dashed 1px #a30000;
}
a:hover {
color: #b70000;
border-bottom: dashed 1px #b70000;
}
$base-font-size: 16px;
$base-line-height: 24px;
$pre-font-size: 16px;
$pre-line-height: 24px;
$code-font-size: 16px;
$code-line-height: 24px;
$header-font-size: 16px;
div.codehilite {
font-size: $header-font-size;
margin: 0px -20px;
padding: 5px 20px;
}
h1 { font-size: $header-font-size * 2; }
h2 { font-size: $header-font-size * 1.5; }
h3 { font-size: $header-font-size * 1.17; }
h4 { font-size: $header-font-size * 1.12; }
h5 { font-size: $header-font-size * .83; }
h6 { font-size: $header-font-size * .75; }
p {
position: relative;
}
html, body {
margin: 0;
padding: 0;
height: 100%;
font: normal #{$base-font-size}/#{$base-line-height} $sans;
text-align: justify;
color: #112;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
letter-spacing: 0.01em;
}
h1, h2, h3, h4, h5 {
font-family: $sans;
text-align: left;
position: relative;
}
.section-number {
position: absolute;
color: #C00;
text-align: right;
left: -70px;
width: 55px;
padding-right: 5px;
}
h1 .section-number {
color: white;
background: #C00;
}
h1 { color: #C00; }
body.front-page {
background: whitesmoke;
}
p > img {
max-width: 90%;
height: auto;
margin-left: auto;
margin-right: auto;
display: block;
}
.content {
padding-top: 20px;
width: 800px;
margin-left: auto;
margin-right: auto;
}
.box {
width: 800px;
margin-left: auto;
margin-right: auto;
margin-top: 50px;
margin-bottom: 50px;
padding: 20px;
}
.box-centered {
text-align: center;
}
.box-white {
background: white;
border: 1px solid #ccc;
box-shadow: 2px 2px 8px #aaa;
border-radius: 5px;
}
.aside {
margin-right: -280px;
position: absolute;
right: 0;
top: 0;
width: 240px;
text-align: left;
font-size: .9em;
}
@media only screen and (max-width: 1200px) {
.box {
width: auto;
left: 0px;
right: 0px;
margin: 0px;
}
.box-white {
border: none;
}
.content {
width: auto;
left: 0px;
right: 0px;
margin: 0px;
}
.aside {
margin-right: 0px;
position: relative;
right: 0px;
width: auto;
text-align: justify;
font-size: .9em;
background: #F0F4C3;
display: block;
padding: 5px;
}
body {
font: normal 14px/18px $sans;
padding: 5px;
}
div.codehilite {
font: normal 10px/13px $monospace;
margin: 0px -5px;
padding: 5px 5px;
}
}
.book-title {
font: 3em $monospace;
text-transform: uppercase;
font-weight: normal;
/* border-width: 0px 1px 0px 1px; */
/* border: dashed #C00; */
border-width: 2px 0px 2px;
padding: 10px 0px 5px 0px;
text-align: center;
letter-spacing: .1em;
color: #C00;
/* background-color: white; */
}
.book-subtitle {
font-family: $monospace;
text-align: center;
letter-spacing: .1em;
}
code {
font: normal #{$code-font-size}/#{$code-line-height} $monospace;
white-space: pre;
}
.aside {
code {
font: normal #{$code-font-size * .9}/#{$code-line-height * .9} $monospace !important;
}
}
pre {
font: normal #{$pre-font-size}/#{$pre-line-height} $monospace;
}
.centered {
display: block;
text-align: center;
}
.start-reading span {
font-family: $sans;
color: white;
background-color: #C00;
border-radius: 10px;
display: inline-block;
padding: 10px;
}
.start-reading {
text-align: center;
}
// Pygments
.codehilite {
background-color: #fdf6e3; color: #586e75;
.hll {
opacity: .4;
}
.c { color: #93a1a1 } /* Comment */
.err { color: #586e75 } /* Error */
.g { color: #586e75 } /* Generic */
.k { color: #859900 } /* Keyword */
.l { color: #586e75 } /* Literal */
.n { color: #586e75 } /* Name */
.o { color: #859900 } /* Operator */
.x { color: #cb4b16 } /* Other */
.p { color: #586e75 } /* Punctuation */
.cm { color: #93a1a1 } /* Comment.Multiline */
.cp { color: #859900 } /* Comment.Preproc */
.c1 { color: #93a1a1 } /* Comment.Single */
.cs { color: #859900 } /* Comment.Special */
.c, .cm, .cp, .c1, .cs {
font-style: italic;
}
.gd { color: #2aa198 } /* Generic.Deleted */
.ge { color: #586e75; font-style: italic } /* Generic.Emph */
.gr { color: #dc322f } /* Generic.Error */
.gh { color: #cb4b16 } /* Generic.Heading */
.gi { color: #859900 } /* Generic.Inserted */
.go { color: #586e75 } /* Generic.Output */
.gp { color: #586e75 } /* Generic.Prompt */
.gs { color: #586e75; font-weight: bold } /* Generic.Strong */
.gu { color: #cb4b16 } /* Generic.Subheading */
.gt { color: #586e75 } /* Generic.Traceback */
.kc { color: #cb4b16 } /* Keyword.Constant */
.kd { color: #268bd2 } /* Keyword.Declaration */
.kn { color: #859900 } /* Keyword.Namespace */
.kp { color: #859900 } /* Keyword.Pseudo */
.kr { color: #268bd2 } /* Keyword.Reserved */
.kt { color: #dc322f } /* Keyword.Type */
.ld { color: #586e75 } /* Literal.Date */
.m { color: #2aa198 } /* Literal.Number */
.s { color: #2aa198 } /* Literal.String */
.na { color: #586e75 } /* Name.Attribute */
.nb { color: #B58900 } /* Name.Builtin */
.nc { color: #268bd2 } /* Name.Class */
.no { color: #cb4b16 } /* Name.Constant */
.nd { color: #268bd2 } /* Name.Decorator */
.ni { color: #cb4b16 } /* Name.Entity */
.ne { color: #cb4b16 } /* Name.Exception */
.nf { color: #268bd2 } /* Name.Function */
.nl { color: #586e75 } /* Name.Label */
.nn { color: #586e75 } /* Name.Namespace */
.nx { color: #586e75 } /* Name.Other */
.py { color: #586e75 } /* Name.Property */
.nt { color: #268bd2 } /* Name.Tag */
.nv { color: #268bd2 } /* Name.Variable */
.ow { color: #859900 } /* Operator.Word */
.w { color: #586e75 } /* Text.Whitespace */
.mf { color: #2aa198 } /* Literal.Number.Float */
.mh { color: #2aa198 } /* Literal.Number.Hex */
.mi { color: #2aa198 } /* Literal.Number.Integer */
.mo { color: #2aa198 } /* Literal.Number.Oct */
.sb { color: #93a1a1 } /* Literal.String.Backtick */
.sc { color: #2aa198 } /* Literal.String.Char */
.sd { color: #586e75 } /* Literal.String.Doc */
.s2 { color: #2aa198 } /* Literal.String.Double */
.se { color: #cb4b16 } /* Literal.String.Escape */
.sh { color: #586e75 } /* Literal.String.Heredoc */
.si { color: #2aa198 } /* Literal.String.Interpol */
.sx { color: #2aa198 } /* Literal.String.Other */
.sr { color: #dc322f } /* Literal.String.Regex */
.s1 { color: #2aa198 } /* Literal.String.Single */
.ss { color: #2aa198 } /* Literal.String.Symbol */
.bp { color: #268bd2 } /* Name.Builtin.Pseudo */
.vc { color: #268bd2 } /* Name.Variable.Class */
.vg { color: #268bd2 } /* Name.Variable.Global */
.vi { color: #268bd2 } /* Name.Variable.Instance */
.il { color: #2aa198 } /* Literal.Number.Integer.Long */
}
div.epigraph {
blockquote {
margin-right: 0px;
float: right;
font-style: italic;
.footer {
font-style: normal;
text-align: right;
}
}
}
div.clear {
clear: both;
}
.sans {
font-family: $sans;
}
.exercise {
background: rgba(38, 139, 210, 0.1);
border-radius: 10px;
margin: 0px -20px;
padding: 5px 20px;
}
.admonition {
.admonition-title {
font-weight: bold;
margin-bottom: 0px;
margin-right: 5px;
float: left;
}
margin: 0 -20px;
padding: 5px 20px;
}
.admonition.warning {
background: #FBE9E7;
color: #a30000;
margin: 0 -20px;
padding: 5px 20px;
}
.admonition.sourcecode {
background: rgba(38, 139, 210, 0.1);
}
.admonition.tryit {
background: rgba(185, 246, 202, 1);
.codehilite {
background-color: transparent;
color: inherit;
margin: 0px 0px;
.c { color: grey; }
}
}
table {
thead {
td {
padding: 6px 3px;
}
}
td {
padding: 6px 3px;
}
}