v6/site_test/css/main.scss

223 lines
4.3 KiB
SCSS
Raw Normal View History

2025-01-04 14:59:15 -05:00
@import "normalize.scss";
@import "fonts.scss";
2025-01-11 16:53:27 -05:00
$page-horizontal-margin: 2rem;
$mobile-breakpoint: 480px;
$container-max-width: 768px;
2025-01-04 14:59:15 -05:00
:root {
--background-color: #f8e7cf;
--text-color: black;
2025-01-11 16:53:27 -05:00
--secondary-text-color: #656565;
2025-01-04 14:59:15 -05:00
--link-color: blue;
--page-vertical-margin: 3rem;
}
.container {
2025-01-11 16:53:27 -05:00
max-width: $container-max-width;
margin: 0 $page-horizontal-margin / 2;
}
@media (min-width: calc($container-max-width + 2 * $page-horizontal-margin)) {
.container {
margin: 0 $page-horizontal-margin;
}
2025-01-04 14:59:15 -05:00
}
a,
a:visited {
color: var(--link-color);
2025-01-11 16:53:27 -05:00
text-decoration-thickness: 2px;
text-underline-offset: 2px;
/* color: white;
text-decoration: none;
background-color: black;
padding: 0 4px; */
2025-01-04 14:59:15 -05:00
}
a:hover {
2025-01-11 16:53:27 -05:00
text-decoration-thickness: 3px;
2025-01-04 14:59:15 -05:00
}
a[href^="http://"]::after,
a[href^="https://"]::after
{
background-color: currentColor;
content: "";
width: calc(max(0.667em, 12px));
height: calc(max(0.667em, 12px));
margin-left: 0.333em;
display: inline-block;
mask: url("data:image/svg+xml;base64," + $external-link) no-repeat 50% 50%;
mask-size: cover;
}
pre,
code {
font-family: "Berkeley Mono";
2025-01-11 16:53:27 -05:00
font-size: 0.9em;
}
blockquote {
position: relative;
font-style: italic;
&::before {
content: open-quote;
font-size: 2em;
position: absolute;
left: -25px;
top: -10px;
}
2025-01-02 13:15:06 -05:00
}
2025-01-11 16:53:27 -05:00
html {
2025-01-04 14:59:15 -05:00
font-family: "Valkyrie A", Charter, serif;
font-size: 16px;
/* background-color: #dfd3c3; */
background-color: var(--background-color);
/* background-color: #e8dbc5; */
color: var(--text-color);
}
header {
margin-top: var(--page-vertical-margin);
2025-01-02 13:15:06 -05:00
font-style: italic;
2025-01-11 16:53:27 -05:00
2025-01-04 14:59:15 -05:00
h1 {
font-size: 5rem;
margin: 0;
a {
color: var(--text-color) !important;
transition: text-decoration-thickness 0.1s ease-in-out;
2025-01-11 16:53:27 -05:00
text-decoration-thickness: 4px;
text-underline-offset: 0.5rem;
&:hover {
text-decoration-thickness: 8px;
}
2025-01-04 14:59:15 -05:00
}
}
p {
margin-top: 0.25rem;
font-size: 1.5rem;
font-weight: lighter;
2025-01-11 16:53:27 -05:00
text-wrap: balance;
2025-01-04 14:59:15 -05:00
}
}
2025-01-11 16:53:27 -05:00
@media (max-width: $mobile-breakpoint) {
header h1 {
font-size: 4rem;
}
}
.article-title {
// balance the number of words per line
text-wrap: balance;
}
2025-01-04 14:59:15 -05:00
.article-content {
font-size: 1.25rem;
2025-01-11 16:53:27 -05:00
// Chrome only, but minimizes orphan words
text-wrap: pretty;
2025-01-02 13:15:06 -05:00
}
2025-01-04 14:59:15 -05:00
.header-anchor {
text-decoration: none;
font-size: 1rem;
vertical-align: middle;
// drag it up so it's more in the middle
padding-bottom: 0.25rem;
2025-01-11 16:53:27 -05:00
color: var(--secondary-text-color) !important;
background: none;
2025-01-04 14:59:15 -05:00
&:hover {
color: var(--link-color) !important;
}
2025-01-02 13:15:06 -05:00
}
2025-01-11 16:53:27 -05:00
.footnote-reference {
> a {
text-decoration: none;
&[href^="#fnref-"] {
display: none;
}
}
&:hover + .sidenote {
color: black;
}
}
.sidenote {
float: right;
margin-right: -50%;
width: 40%;
font-size: 1rem;
line-height: 1.25;
color: var(--secondary-text-color);
transition: color 0.2s ease-in-out;
display: none;
.sidenote-p {
margin: 20px 0;
display: block;
}
}
.footnote {
display: flex;
flex-direction: row;
gap: 8px;
font-size: 1rem;
.footnote-marker {
flex-shrink: 0;
width: 34px;
text-align: right;
}
.footnote-backref {
text-decoration: none;
}
> div > p:first-child {
margin-top: 0;
}
> div > p:last-child {
margin-top: 0;
}
}
// 1.5 to account for -50% margin-right on .sidenote
// plus page-horizontal-margin to effectively use that as the margin
@media (min-width: calc(1.5 * $container-max-width + 2 * $page-horizontal-margin)) {
.footnote-reference {
> a[href^="#fn-"] {
display: none;
}
> a[href^="#fnref-"] {
display: inline;
}
}
.sidenote {
display: block;
}
.footnote {
display: none;
}
2025-01-04 14:59:15 -05:00
}
footer {
margin-bottom: var(--page-vertical-margin);
2025-01-02 13:15:06 -05:00
font-style: italic;
2025-01-04 14:59:15 -05:00
font-size: 1.5rem;
ul {
padding: 0;
list-style: none;
}
}
2025-01-11 16:53:27 -05:00
@media (max-width: $mobile-breakpoint) {
footer {
font-size: 1rem;
2025-01-04 14:59:15 -05:00
}
2025-01-01 23:31:50 -05:00
}