/* * Nick's web site: default stylesheet * * Copyright © 2018-2020 Nick Bowler * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ // colour definitions $backgroundcolour: #ffffff; $foregroundcolour: #000000; $linkdefaultcolour: #0000cd; $linkactivecolour: #ff0000; $linkvisitedcolour: #800080; $ruledefaultcolour: #d3d3d3; $annotationcolour: #708090; @mixin header_size($maxwidth, $fontsize) { font-size: $fontsize; max-width: 1em * ($maxwidth / $fontsize); } body { background-color: $backgroundcolour; color: $foregroundcolour; font-family: sans-serif; margin: 1em; } a:link { color: $linkdefaultcolour; } a:visited { color: $linkvisitedcolour; } a:active { color: $linkactivecolour; } h1 { @include header_size(60em, 2em); } h2 { @include header_size(60em, 1.5em); } p, dt, dd, li { text-align: justify; padding: 0; margin: 0; } p, div, ul, ol, dl, hr { max-width: 50em; padding: 0; margin: 0; } p, body>div { margin: 1em 0; } li { margin: 0 0 0 2em; } dd { margin: 0 0 0 1em; } hr { clear: both; margin: 0.5em 0; border: 0; border-top: 1px solid $ruledefaultcolour; } kbd { font-family: monospace; font-size: 0.95em; &:before { content: "% "; } } .permalink { font-size: small; color: $annotationcolour; a:link, a:visited { color: inherit; } } @media not screen { .permalink { visibility: hidden; } } // Site header rules #breadcrumbs>*, #sitetitle>* { font-size: 0.8em; } #breadcrumbs { * { display: inline; list-style-type: none; vertical-align: top; padding: 0; margin: 0; } li + li:before { content: "/ "; } } #sitetitle * { display: inline-block; float: right; } // Site footer rules #footer { text-align: center; max-width: 44em; padding: 0 3em; margin: 0; p { color: $annotationcolour; display: inline-block; font-size: 0.8em; max-width: 100%; margin: 0.2em 0; } } // "unordered" lists with explicit ordering in content ul.ordered > { li { list-style: none; } li>span:first-child, li>*:first-child>span:first-child { display: inline-block; text-align: right; margin-left: -1.8em; min-width: 1.8em; } } @media (max-width: 512px) { body { margin: 0.6em; } ul ul { margin-left: -1.2em; } dd { margin: 0; } } @media (max-width: 35em) { #sitetitle * { float: none; } #footer { padding: 0 1em; } } @media (max-width: 28em) { * { text-align: left; } }