X-Git-Url: http://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/e7306bc0bbfea36e6414684b00ad4ef1c7269aed..e1908f247e262b45949dd6d4a0d62ca54664cf15:/content/style.scss diff --git a/content/style.scss b/content/style.scss index dc306d7..04736d8 100644 --- a/content/style.scss +++ b/content/style.scss @@ -1,4 +1,4 @@ -/* +/*! * Nick's web site: default stylesheet * * Copyright © 2018-2021 Nick Bowler @@ -44,15 +44,50 @@ body { margin: 1em; } -a:link { color: $linkdefaultcolour; } -a:visited { color: $linkvisitedcolour; } -a:active { color: $linkactivecolour; } +a:link { color: $linkdefaultcolour; border-color: $linkdefaultcolour; } +a:visited { color: $linkvisitedcolour; border-color: $linkvisitedcolour; } +a:active { color: $linkactivecolour; border-color: $linkactivecolour; } h1 { @include header_size(60em, 2em); } h2 { @include header_size(60em, 1.5em); } h5 { @include header_size(60em, 1em); } -p>img { max-width: 40em; width: 100%; height: auto; } +@supports (display: grid) { + .gallery { + display: grid; + grid-column-gap: 1em; + grid-template-columns: repeat( auto-fill, minmax(18em, 1fr) ); + align-items: center; + + p.img { margin: 0.5em 0; } + } +} + +p.img { + text-align: center; + + img { + vertical-align: bottom; + max-width: 40em; + width: 100%; + height: auto; + } + + a { + text-decoration: none; + display: inline-block; + border: solid 2px; + } + + small { + color: $foregroundcolour; + text-align: justify; + @media (max-width: 24em) { text-align: left; } + padding: 0.5ex; + display: block; + font-size: 0.9em; + } +} p, dt, dd, li { text-align: justify; @@ -68,6 +103,10 @@ p, table, div, ul, ol, dl, hr { } p, table, body>div, h5 { margin: 1em 0; } +blockquote { + @media (max-width: 28em) { margin: 1em 0.5em; } + margin: 1em; +} li { margin: 0 0 0 2em; } dd { margin: 0 0 0 1em; } @@ -83,6 +122,14 @@ kbd { font-family: monospace; font-size: 0.95em; &:before { content: "% "; } + &>span { white-space: nowrap; } + + blockquote & { + display: block; + text-align: left; + padding-left: 3em; + text-indent: -3em; + } } .permalink { @@ -228,7 +275,7 @@ $clickynames: name, date, size; } } - &:focus ~ table th.clicky-#{$col}>label~label>span { + &:focus ~ table th.clicky-#{$col}>label~label>span:first-child { border-color: $foregroundcolour; } @@ -244,15 +291,15 @@ $clickynames: name, date, size; &:checked ~ table { // Update table header state & th.clicky-#{$col} { - img+img { + .svg+.svg { display: -moz-inline-box !important; display: inline-block !important; } - img { display: none; } + .svg { display: none; } } } - &:focus ~ table th.clicky-#{$col}>label~label>img { + &:focus ~ table th.clicky-#{$col}>label~label .svg { border-color: $foregroundcolour; } @@ -261,48 +308,61 @@ $clickynames: name, date, size; opacity: 0; z-index: -2; } +} - th.clicky-#{$col}>label { - &, &>* { - white-space: nowrap; - vertical-align: middle; - display: -moz-inline-box; - display: inline-block; - cursor: pointer; - } +thead.clicky label { + white-space: nowrap; + line-height: 1.5em; + cursor: pointer; - &>* { border: 1px dotted transparent; } + &>* { + display: -moz-inline-box; + display: inline-block; + border: 1px dotted transparent; + vertical-align: middle; + } - // Expand the first label a bit so the table (hopefully) - // does not reshape as columns are selected. - &:first-child { - margin-right: 1.75em; - padding-right: 2px; - } + // Expand the first label a bit so the table (hopefully) + // does not reshape as columns are selected. + &:first-child { + margin-right: 1.75em; + padding-right: 2px; + } - &:active { color: $linkactivecolour; } - &:first-child:active>span, &~label:active>img { - border-color: $linkactivecolour; - } + &:active { color: $linkactivecolour; } + &:first-child:active>span, &~label:active>.svg { + border-color: $linkactivecolour; + } - img { - margin-left: 0.25em; - width: 1.5em; - height: auto; - } + .svg { + margin-left: 0.25em; + } + + .svg, svg, img.svgfallback { + height: 1.5em; + width: auto; } + .svg svg { width: 1.5em; } } table.filelist { - &>tr>*:first-child, &>*>tr>*:first-child { - &+td { min-width: 50%; } - width: 0; + &>*>tr>*:first-child { + &+* { width: 50%; } + // chrome doesn't like width: 0 for some reason + width: 0.1px; } - tbody img { - display: block; - height: 1.5em; - width: auto; + tbody { + .svg, svg, img.svgfallback { + vertical-align: middle; + height: 1.5em; + width: auto; + } + + .svg { + svg { width: 1.5em; } + display: inline-block; + } } } @@ -342,6 +402,8 @@ table.filelist { #footer p { color: $annotationcolour; } #article-info p { font-style: italic; } +.wbr:after { content: "\200b"; } + // "unordered" lists with explicit ordering in content ul.ordered > { li { list-style: none; }