X-Git-Url: https://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/da38a0de6d2814c450ea356412faa03ee54cad68..4f4b3ddd920c95d380a2f25dabd4b68457bb1564:/content/style.scss diff --git a/content/style.scss b/content/style.scss index 79d4ffb..b0c042c 100644 --- a/content/style.scss +++ b/content/style.scss @@ -26,9 +26,12 @@ $linkactivecolour: #ff0000; $linkvisitedcolour: #800080; $ruledefaultcolour: #d3d3d3; +$rulestrongcolour: #696969; $annotationcolour: #708090; +$tableshadecolour: #f5f5f5; + @mixin header_size($maxwidth, $fontsize) { font-size: $fontsize; max-width: 1em * ($maxwidth / $fontsize); @@ -48,19 +51,21 @@ a:active { color: $linkactivecolour; } h1 { @include header_size(60em, 2em); } h2 { @include header_size(60em, 1.5em); } +p>img { max-width: 40em; width: 100%; height: auto; } + p, dt, dd, li { text-align: justify; padding: 0; margin: 0; } -p, div, ul, ol, dl, hr { +p, table, div, ul, ol, dl, hr { max-width: 50em; padding: 0; margin: 0; } -p, body>div { margin: 1em 0; } +p, table, body>div { margin: 1em 0; } li { margin: 0 0 0 2em; } dd { margin: 0 0 0 1em; } @@ -88,6 +93,50 @@ kbd { .permalink { visibility: hidden; } } +// General table styles. +table { + border: 1px solid $ruledefaultcolour; + border-collapse: collapse; + width: 100%; +} + +table>* { font-size: 0.9em; } +caption { + caption-side: top; + font-weight: bold; + font-size: 1em; + text-align: left; + margin: 0 0 0.5em 0; +} + +td, th { + vertical-align: middle; + text-align: left; + padding: 1ex; + margin: 0; +} + +thead>tr, tbody>tr { border: solid $ruledefaultcolour; } +th, thead>tr { border-bottom: 1px solid $rulestrongcolour; } +*>table, *>th { border: none; } +thead>tr { border-width: 1px; } +tbody>tr { border-width: 0 1px; } + +td + td { box-shadow: -1px 0 $backgroundcolour; } + +tbody>tr { + &:nth-of-type(even) { background-color: $tableshadecolour; } + &:last-child { border-bottom: solid 1px $ruledefaultcolour; } +} + +// Specific table styles +table.cc { + &>tr>*:first-child, &>*>tr>*:first-child { + &+* { text-align: center; } + text-align: center; + } +} + // Site header rules #breadcrumbs>*, #sitetitle>* { font-size: 0.8em; } #breadcrumbs {