Files
JohnTech/static/css/custom.css
2026-04-03 21:37:31 +01:00

171 lines
3.0 KiB
CSS

/* ============================================
Global readability improvements
============================================ */
body {
font-size: 17px;
line-height: 1.5;
letter-spacing: 0.015em;
color: var(--base06);
}
p {
margin: 0 0 2rem 0;
}
h1, h2, h3, h4, h5, h6 {
margin: 3rem 0 1rem 0;
}
/* ============================================
Links
============================================ */
a:link,
a:visited {
transition: color 0.15s ease;
}
/* ============================================
Blockquotes
============================================ */
blockquote {
margin: 0 0 2rem 0;
padding: 0.75rem 1.25rem;
border-left: 3px solid var(--base0E);
background-color: var(--base01);
border-radius: 0 4px 4px 0;
}
blockquote::before {
content: none;
}
blockquote p:last-child {
margin-bottom: 0;
}
/* ============================================
Code blocks
============================================ */
pre {
border-radius: 6px;
padding: 1.25rem 1.5rem;
}
code {
border-radius: 3px;
padding: 0.15em 0.35em;
}
pre code {
padding: 0;
}
/* ============================================
Post list
============================================ */
.post-list {
list-style: none;
padding-left: 0;
display: flex;
flex-direction: column;
gap: 0;
}
.post-list .post-item {
padding: 1.5rem 0;
border-bottom: 1px solid var(--base02);
}
.post-list .post-item:first-child {
padding-top: 0;
}
.post-list .post-item::marker {
content: "";
}
.post-item__link {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 1.5rem;
text-decoration: none;
}
.post-item__title {
font-size: 1.15rem;
font-weight: 600;
color: var(--link);
}
.post-item__link:hover .post-item__title {
color: var(--hover);
}
.post-item__date {
font-size: 0.8rem;
color: var(--muted);
white-space: nowrap;
flex-shrink: 0;
}
.post-item__summary {
margin: 0.4rem 0 0 0;
font-size: 0.8rem;
line-height: 1.4;
color: var(--base04);
}
.post-item__tags {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-top: 0.5rem;
}
.post-item__tag {
font-size: 0.7rem;
padding: 0.15rem 0.55rem;
background-color: var(--base02);
color: var(--base0E);
border-radius: 3px;
text-decoration: none;
transition: background-color 0.15s ease, color 0.15s ease;
}
.post-item__tag:link,
.post-item__tag:visited {
color: var(--base0E);
}
.post-item__tag:hover {
background-color: var(--base03);
color: var(--hover);
}
/* ============================================
Mobile
============================================ */
@media (max-width: 30rem) {
.post-item__link {
flex-direction: column;
gap: 0.2rem;
}
.post-item__date {
order: -1;
font-size: 0.75rem;
}
.post-item__tag {
font-size: 0.75rem;
padding: 0.25rem 0.65rem;
}
}