vanilla-hugo/assets/scss/style.scss

473 lines
7.9 KiB
SCSS
Raw Normal View History

@import "variables.scss";
@import "mixins.scss";
@import "toc.scss";
@import "modes.scss";
body {
@include var(background-color, background-color);
@include var(color, text-color);
font-family: $font-body;
font-size: 1.0rem;
line-height: 1.5;
margin-bottom: 1rem;
text-align: justify;
@include below-container-width {
text-align: left;
}
}
h1, h2, h3, h4, h5, h6 {
margin-bottom: .1rem;
margin-top: .5rem;
font-family: $font-heading;
font-weight: normal;
text-align: center;
2022-01-01 20:12:50 -08:00
&:target {
@include var(background-color, target-background-color);
2022-01-01 20:12:50 -08:00
border-radius: 1rem;
}
a {
border-bottom: none;
&:hover {
color: $primary-color;
}
}
}
2024-05-21 19:04:34 -07:00
p {
&:target {
@include var(background-color, target-background-color);
border-radius: 0.25rem;
}
}
.container {
position: relative;
margin: auto;
width: 100%;
max-width: $container-width;
box-sizing: border-box;
@include below-container-width {
padding: 0 $container-min-padding 0 $container-min-padding;
margin: 0;
max-width: $container-width + 2 * $container-min-padding;
}
@include below-two-margins {
left: -($margin-width + $margin-inner-offset + $margin-outer-offset)/2;
}
@include below-one-margin {
left: 0;
}
}
.button, input[type="submit"] {
@include var(color, text-color);
padding: 0.5rem;
border: 1px solid $primary-color;
transition: color 0.25s, background-color 0.25s;
text-align: left;
&:focus {
outline: none;
}
&:hover, &:focus {
background-color: rgba($primary-color, 0.2);
@include var(color, text-color);
}
}
.input[type="text"], textarea {
@include textual-input;
}
nav {
width: 100%;
margin: 0rem 0rem 1rem 0rem;
.container {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
a {
padding: 0.25rem 0.75rem 0.25rem .75rem;
text-decoration: none;
@include var(color, text-color);
display: inline-block;
border-bottom: none;
white-space: nowrap;
}
}
.post-subscript {
text-align: center;
}
.post-content {
margin-top: .5rem;
}
h1 {
font-size: 3.0rem;
}
h2 {
font-size: 2.6rem;
}
h3 {
font-size: 2.2rem;
}
h4 {
font-size: 1.8rem;
}
h5 {
font-size: 1.4rem;
}
h6 {
font-size: 1.0rem;
}
a {
@include var(color, text-color);
text-decoration: none;
border-bottom: .2rem solid $primary-color;
&:hover {
color: $primary-color;
transition: color 0.25s;
}
&.external-link, &.same-page-link {
.feather {
fill: none;
margin-left: 0.25rem;
position: relative;
top: 0.125em;
}
}
}
.draft-link {
border-bottom: .2rem solid $border-color;
}
img {
2023-03-11 11:52:49 -08:00
max-width: 100%;
background-color: white;
}
table {
@include bordered-block;
margin: auto;
padding: 0.5rem;
}
.fold-table + table {
tr {
@include below-container-width {
display: flex;
flex-direction: column;
}
}
}
td {
@include below-container-width {
overflow-x: auto;
}
}
td, th {
2022-09-10 12:32:10 -07:00
padding: 0.5rem;
}
div.highlight tr {
display: table-row;
}
hr.header-divider {
background-color: $primary-color;
height: 0.3rem;
border: none;
border-radius: 0.15rem;
}
hr.footer-divider {
margin: auto;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
border: none;
border-bottom: $standard-border;
max-width: $container-width;
@include below-container-width {
max-width: 80%;
}
}
ul.post-list {
list-style: none;
padding: 0;
li {
@include bordered-block;
margin-bottom: 1rem;
padding: 1rem;
}
p {
margin: 0;
}
a.post-title {
border-bottom: none;
font-size: 1.4rem;
font-family: $font-heading;
text-align: center;
display: block;
}
2023-01-31 18:54:08 -08:00
p.post-status {
margin-bottom: 0.2rem;
margin-top: 0.2rem;
}
p.post-wordcount, p.post-status {
text-align: center;
margin-bottom: 0.6rem;
}
.series-link {
display: flex;
align-items: center;
margin-top: 1rem;
font-size: 1.1rem;
border-top: $standard-border;
padding-top: 1rem;
.feather {
fill: none;
flex-shrink: 0;
width: 1em;
height: 1em;
margin-right: 0.5em;
}
}
}
.katex-html {
white-space: nowrap;
}
figure {
break-inside: avoid;
img {
border: $standard-border;
2023-03-11 11:52:49 -08:00
border-radius: 0.5rem;
max-width: 70%;
display: block;
margin: auto;
@include below-container-width {
max-width: 100%;
}
}
figcaption {
text-align: center;
}
2022-01-01 20:12:50 -08:00
&.fullwide img {
max-width: 100%;
}
&.tiny img {
max-height: 15rem;
}
&.small img {
max-height: 20rem;
}
&.medium img {
max-height: 30rem;
}
&.fullwide {
margin-left: 0;
margin-right: 0;
}
}
.twitter-tweet {
margin: auto;
}
2023-01-01 01:28:18 -08:00
.warning {
@include bordered-block;
padding: 0.5rem;
@include var(background-color, warning-background-color);
@include var(border-color, warning-border-color);
}
/*
Note: by absolute default (via inline CSS) feather icons are hidden.
That's because firefox reader mode doesn't play nice with them, and
it seems to ignore all styles in <head>. Then, the inline style
in <head> uses !important to restore the display of icons, but provides
limited styling. Here, we finally apply the full extent of the feather
styles.
*/
.feather {
width: 1rem;
height: 1rem;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
fill: currentColor;
}
2022-03-27 18:52:53 -07:00
.katex * {
font-family: unset;
}
2022-07-02 16:13:57 -07:00
2022-09-10 12:32:10 -07:00
.block {
@include bordered-block;
margin: auto;
padding: 0.5rem;
width: fit-content;
}
2022-07-02 16:13:57 -07:00
.dialog {
.message {
max-width: 0.8*$container-width;
margin-top: 0.5rem;
display: flex;
flex-direction: row;
.message-sender {
width: 4rem;
2022-08-28 19:07:14 -07:00
margin: 0.75rem;
2022-07-02 16:13:57 -07:00
.feather {
width: 2rem;
height: 1.6rem;
}
}
2022-08-28 19:07:14 -07:00
.message-text {
@include bordered-block;
display: block;
padding: 0.75rem;
}
2022-07-02 16:13:57 -07:00
&.side-answer {
margin-left: auto;
flex-direction: row-reverse;
}
}
}
2023-01-31 17:43:05 -08:00
.series-navigation {
margin-top: 1em;
display: flex;
flex-wrap: wrap;
.wrapper {
flex-grow: 1;
display: flex;
&.previous {
justify-content: left;
}
&.next {
justify-content: right;
}
}
a, .ongoing-placeholder {
@include bordered-block;
padding: 0.5em 1em 0.5em 1em;
font-size: 1.1em;
display: flex;
align-items: center;
margin-top: 1em;
.feather {
height: 1.25em;
width: 1.25em;
fill: none;
&:first-child { margin-right: 0.5em; }
&:last-child { margin-left: 0.5em; }
}
}
.ongoing-placeholder {
border-style: dashed;
}
div.title {
font-weight: bold;
}
}
2023-01-31 17:43:05 -08:00
.series-status {
2023-02-19 15:10:25 -08:00
&.suspended { --status-color: #f9b005; }
&.complete { --status-color: #3dc60b; }
&.ongoing { --status-color: #46a0ff; }
.series-status-keyword {
display: inline-block;
border-bottom: .2rem solid var(--status-color);
margin: 0 0.25rem 0 0.25rem;
2023-01-31 17:43:05 -08:00
}
}
2023-06-04 21:54:08 -07:00
details {
@include bordered-block;
padding: 0.5rem 0.5rem 0 0.5rem;
&[open] {
padding-bottom: 0.5rem;
summary {
border-bottom: $standard-border;
margin-bottom: 0.5rem;
}
}
}
summary {
margin: 0 -0.5rem 0 -0.5rem;
padding: 0.5rem;
padding-top: 0;
}
blockquote {
border-left: (3 * $standard-border-width) solid $primary-color;
margin-left: 0;
padding-left: 1rem;
}
.early-navigation-wrapper {
margin-bottom: 3rem;
}