2 * Nick's web site: default stylesheet
4 * Copyright © 2018-2020 Nick Bowler
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 $backgroundcolour: #ffffff;
22 $foregroundcolour: #000000;
24 $linkdefaultcolour: #0000cd;
25 $linkactivecolour: #ff0000;
26 $linkvisitedcolour: #800080;
28 $ruledefaultcolour: #d3d3d3;
29 $rulestrongcolour: #696969;
31 $annotationcolour: #708090;
33 $tableshadecolour: #f5f5f5;
35 @mixin header_size($maxwidth, $fontsize) {
37 max-width: 1em * ($maxwidth / $fontsize);
41 background-color: $backgroundcolour;
42 color: $foregroundcolour;
43 font-family: sans-serif;
47 a:link { color: $linkdefaultcolour; }
48 a:visited { color: $linkvisitedcolour; }
49 a:active { color: $linkactivecolour; }
51 h1 { @include header_size(60em, 2em); }
52 h2 { @include header_size(60em, 1.5em); }
53 h5 { @include header_size(60em, 1em); }
55 p>img { max-width: 40em; width: 100%; height: auto; }
63 p, table, div, ul, ol, dl, hr {
69 p, table, body>div, h5 { margin: 1em 0; }
71 li { margin: 0 0 0 2em; }
72 dd { margin: 0 0 0 1em; }
78 border-top: 1px solid $ruledefaultcolour;
82 font-family: monospace;
84 &:before { content: "% "; }
89 color: $annotationcolour;
91 a:link, a:visited { color: inherit; }
94 .permalink { visibility: hidden; }
97 // General table styles.
99 border: 1px solid $ruledefaultcolour;
100 border-collapse: collapse;
104 table>* { font-size: 0.9em; }
114 vertical-align: middle;
120 thead>tr, tbody>tr { border: solid $ruledefaultcolour; }
121 th, thead>tr { border-bottom: 1px solid $rulestrongcolour; }
122 *>table, *>th { border: none; }
123 thead>tr { border-width: 1px; }
124 tbody>tr { border-width: 0 1px; }
126 td + td { box-shadow: -1px 0 $backgroundcolour; }
129 &:nth-of-type(even) { background-color: $tableshadecolour; }
130 &:last-child { border-bottom: solid 1px $ruledefaultcolour; }
133 // Specific table styles
135 &>tr>*:first-child, &>*>tr>*:first-child {
136 &+* { text-align: center; }
142 #breadcrumbs>*, #sitetitle>* { font-size: 0.8em; }
146 list-style-type: none;
152 li + li:before { content: "/ "; }
155 display: inline-block;
160 #footer, #article-info {
167 display: inline-block;
174 #footer p { color: $annotationcolour; }
175 #article-info p { font-style: italic; }
177 // "unordered" lists with explicit ordering in content
179 li { list-style: none; }
180 li>span:first-child, li>*:first-child>span:first-child {
181 display: inline-block;
188 @media (max-width: 512px) {
189 body { margin: 0.6em; }
190 ul ul { margin-left: -1.2em; }
194 @media (max-width: 35em) {
195 #sitetitle * { float: none; }
196 #footer { padding: 0 1em; }
198 @media (max-width: 28em) {
199 * { text-align: left; }