blog/sass/_base.scss

303 lines
4.5 KiB
SCSS
Raw Normal View History

@use 'fonts';
@use 'theme';
2025-12-23 22:27:51 +01:00
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: fonts.$text-font;
scroll-behavior: smooth;
}
body {
color: var(--text);
background-color: var(--base);
font-size: 1rem;
line-height: 1.75;
}
article {
2025-12-23 22:27:51 +01:00
max-width: min(700px, 95%);
margin-left: auto;
margin-right: auto;
}
section {
&.title {
border-bottom-width: 1px;
border-bottom-color: var(--overlay0);
border-bottom-style: solid;
2025-12-23 22:27:51 +01:00
2025-12-23 22:27:51 +01:00
&>h1.title {
font-size: 3rem;
font-weight: 900;
margin-bottom: 0;
margin-top: 0;
}
2025-12-23 22:27:51 +01:00
&>p {
&.metadata {
2025-12-23 22:27:51 +01:00
color: var(--subtext0);
2025-12-23 22:27:51 +01:00
font-size: .8rem;
font-style: italic;
text-align: end;
}
&.subtitle {
2025-12-23 22:27:51 +01:00
color: var(--subtext1);
2025-12-23 22:27:51 +01:00
font-size: 1.5rem;
margin-top: 0;
margin-bottom: 2rem;
}
}
}
}
h1 {
font-size: 2rem;
2025-12-23 22:27:51 +01:00
font-weight: medium;
margin-top: 2rem;
margin-bottom: 1rem;
}
h2 {
font-size: 1.5rem;
margin-bottom: 1rem;
2025-12-23 22:27:51 +01:00
font-weight: medium;
}
h3 {
font-size: 1.2rem;
margin-bottom: .6rem;
2025-12-23 22:27:51 +01:00
font-weight: medium;
}
h4 {
font-size: 1.1rem;
2025-12-23 22:27:51 +01:00
font-weight: medium;
}
h5 {
font-size: 1rem;
2025-12-23 22:27:51 +01:00
font-weight: medium;
}
h6 {
font-size: .9rem;
2025-12-23 22:27:51 +01:00
font-weight: medium;
}
2025-12-23 22:27:51 +01:00
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
p {
margin-top: 1.25rem;
margin-bottom: 1.25rem;
}
a {
color: var(--blue);
text-decoration: underline;
text-decoration-color: color-mix(in srgb, var(--blue), transparent 40%);
text-decoration-thickness: 0.01rem;
text-underline-offset: 0.3rem;
2025-12-23 22:27:51 +01:00
&:hover {
color: var(--sky);
}
2025-12-23 22:27:51 +01:00
&:visited {
color: var(--lavender);
}
2025-12-23 22:27:51 +01:00
&.zola-anchor {
color: var(--text);
text-decoration-color: var(--text);
margin-left: .5rem;
}
}
li {
&::marker {
color: var(--overlay1);
}
}
img,
video {
max-width: 100%;
height: auto;
margin-left: auto;
margin-right: auto;
display: block;
border-radius: var(--standard-border-radius);
}
pre {
2025-12-23 22:27:51 +01:00
font-family: fonts.$mono-font;
padding: 1.25rem;
border-radius: var(--standard-border-radius);
border-style: solid;
border-color: var(--overlay0);
border-width: 0.15rem;
2025-12-23 22:27:51 +01:00
line-height: initial;
overflow-x: scroll;
&>code {
background-color: initial;
border: initial;
}
}
code {
2025-12-23 22:27:51 +01:00
font-family: fonts.$mono-font;
background-color: var(--mantle);
padding: .2rem;
border-radius: .3rem;
border-style: dashed;
border-width: .1rem;
border-color: var(--surface0);
}
table {
border-collapse: separate;
border-spacing: 0;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
margin-left: auto;
margin-right: auto;
2025-12-23 22:27:51 +01:00
overflow-x: scroll;
}
td,
th {
padding: 0.5rem;
padding: 1rem 1.5rem;
border-style: solid;
border-width: .1rem;
border-color: var(--overlay0);
text-align: start;
}
th {
background-color: var(--base);
text-transform: uppercase;
font-weight: medium;
font-size: small;
border: none
}
2025-12-23 22:27:51 +01:00
tr:first-child>td:first-child {
border-top-left-radius: var(--standard-border-radius);
}
2025-12-23 22:27:51 +01:00
tr:first-child>td:last-child {
border-top-right-radius: var(--standard-border-radius);
}
2025-12-23 22:27:51 +01:00
tr:last-child>td:first-child {
border-bottom-left-radius: var(--standard-border-radius);
}
2025-12-23 22:27:51 +01:00
tr:last-child>td:last-child {
border-bottom-right-radius: var(--standard-border-radius);
}
2025-12-23 22:27:51 +01:00
tr>td:last-child {
border-right-width: .15rem;
}
2025-12-23 22:27:51 +01:00
tr:first-child>td {
border-top-width: .15rem;
}
2025-12-23 22:27:51 +01:00
tr>td:first-child {
border-left-width: .15rem;
}
2025-12-23 22:27:51 +01:00
tr:last-child>td {
border-bottom-width: .15rem;
}
tr:nth-child(even) td {
background-color: var(--surface0);
}
hr {
color: var(--overlay0);
margin-top: 3rem;
margin-bottom: 3rem;
width: 50%;
margin-left: auto;
margin-right: auto;
2025-12-23 22:27:51 +01:00
border-style: solid;
border-radius: 1rem;
border-width: 1px;
}
blockquote {
position: relative;
margin-inline: 0;
margin-block-end: 2rem;
padding-inline-start: 2em;
overflow: hidden;
quotes: "" "" "" "";
&::before,
&::after {
position: absolute;
}
&::before {
content: "";
left: .2rem;
font-size: 2rem;
color: var(--overlay1);
}
&::after {
content: "";
left: .6rem;
top: 2rem;
width: 1px;
height: 100%;
background-color: var(--overlay1);
}
}
cite {
&::before {
content: "~ "
}
font-style: italic;
color: var(--subtext0);
}
footer.footnotes {
font-size: .8rem;
color: var(--subtext1);
margin-top: 3rem;
border-top: 1px solid var(--overlay0);
2025-12-23 22:27:51 +01:00
&>ol.footnotes-list>li {
margin-top: 1rem;
&>p {
margin: {
top: .4rem;
bottom: .4rem;
}
}
}
}