hugo-theme-contentful/assets/css/main.css

341 lines
5.2 KiB
CSS
Raw Normal View History

2020-05-11 15:59:06 +00:00
:root {
/* The color palette. */
2020-05-12 08:31:55 +00:00
--background: #FAFAFA;
--background-light: #E1E1E1;
2020-05-11 15:59:06 +00:00
--foreground: #000000;
--foreground-light: #363537;
2020-05-09 07:19:04 +00:00
--grey: #454545;
2020-05-11 15:59:06 +00:00
/* The fonts. */
--body-family: serif;
--header-family: sans-serif;
2020-10-21 03:28:02 +00:00
--mono-family: monospace;
2020-05-11 15:59:06 +00:00
/* Spacing options. */
2020-05-12 08:31:55 +00:00
--font-size: 20px;
2020-05-11 15:59:06 +00:00
--vertical-rhythm: 24px;
2020-10-21 03:28:02 +00:00
--content-width: 750px;
2020-05-11 15:59:06 +00:00
--border-style: var(--foreground) solid 1px;
2019-09-20 16:11:12 +00:00
}
@media (prefers-color-scheme: light) {
:root {
--background: #FAFAFA;
--background-light: #E1E1E1;
--foreground: #000000;
--foreground-light: #363537;
--grey: #454545;
}
}
@media (prefers-color-scheme: dark) {
:root {
--background: #000000;
--background-light: #363537;
--foreground: #FAFAFA;
--foreground-light: #CCCCCC;
--grey: #919191;
}
2020-05-09 07:19:04 +00:00
}
2020-05-11 15:59:06 +00:00
:root {
2020-05-12 08:31:55 +00:00
font-family: var(--body-family);
2020-05-11 15:59:06 +00:00
font-size: var(--font-size);
2020-05-12 08:31:55 +00:00
background: var(--background);
color: var(--foreground);
line-height: var(--vertical-rhythm);
2019-09-20 16:11:12 +00:00
margin: 0;
padding: 0;
}
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0 auto;
2020-05-11 15:59:06 +00:00
max-width: var(--content-width);
2019-09-20 16:11:12 +00:00
padding: 1rem;
2020-05-09 07:19:04 +00:00
}
nav {
2020-05-11 15:59:06 +00:00
margin: 1rem auto;
2020-05-09 07:19:04 +00:00
}
article h2 {
2020-05-11 15:59:06 +00:00
margin-top: 3rem;
2020-05-09 07:19:04 +00:00
}
article h3 {
2020-05-11 15:59:06 +00:00
margin-top: 2rem;
2020-05-09 07:19:04 +00:00
}
/* Text formatting */
h1, h2, h3,
h4, h5, h6 {
2020-05-11 15:59:06 +00:00
font-family: var(--header-family);
2020-05-09 07:19:04 +00:00
line-height: 1.25;
2019-09-20 16:11:12 +00:00
}
2020-05-09 07:19:04 +00:00
a {
color: #3AA2BF;
2019-09-20 16:11:12 +00:00
}
2020-05-09 07:19:04 +00:00
a:visited {
color: #AC5A82;
2019-09-20 16:11:12 +00:00
}
2020-05-13 18:54:02 +00:00
code {
2020-10-21 03:28:02 +00:00
font-family: var(--mono-family);
2020-05-13 18:54:02 +00:00
font-size: 0.9em;
}
2020-05-09 07:19:04 +00:00
dd, li, p, td {
line-height: 1.5;
}
2020-05-12 17:41:43 +00:00
p {
2020-05-11 15:59:06 +00:00
margin-top: 1rem;
margin-bottom: 1rem;
2019-09-20 16:11:12 +00:00
}
2020-05-13 18:54:02 +00:00
dd {
2020-05-12 17:41:43 +00:00
margin-top: 0.5rem;
margin-bottom: 1.5rem;
}
2020-05-12 08:31:55 +00:00
kbd {
border: var(--border-style);
font-size: 0.85rem;
font-weight: bold;
padding: 0.25rem;
}
2019-09-20 16:11:12 +00:00
tr:nth-child(even) {
background: var(--background-light);
}
pre {
background: var(--foreground);
color: var(--background);
2020-10-21 03:28:02 +00:00
font-family: var(--mono-family);
2020-05-11 15:59:06 +00:00
font-size: 1rem;
2020-05-09 07:19:04 +00:00
line-height: 1.5;
2020-05-11 15:59:06 +00:00
margin-top: 1rem;
margin-bottom: 1rem;
padding: 0.5rem;
2019-09-20 16:11:12 +00:00
overflow: auto;
}
2020-05-09 07:19:04 +00:00
/* Multimedia blocks */
2019-09-20 16:11:12 +00:00
img, video, audio, iframe {
2020-05-11 15:59:06 +00:00
display: block;
2019-09-20 16:11:12 +00:00
height: auto;
2020-05-11 15:59:06 +00:00
max-width: 100%;
margin: auto;
}
table {
border: var(--border-style);
border-collapse: collapse;
margin: auto;
}
thead, tbody {
margin: 0 auto;
}
th, td {
border: var(--border-style);
padding: 1rem;
}
ol, ul {
line-height: 1.5;
2019-09-20 16:11:12 +00:00
}
2020-05-09 07:19:04 +00:00
figure {
2020-05-11 15:59:06 +00:00
margin: 2rem auto;
}
figure > * {
margin: 1rem auto;
}
figcaption {
text-align: center;
font-size: 1rem;
2020-05-09 07:19:04 +00:00
}
svg {
2020-05-12 08:31:55 +00:00
height: 1rem;
width: 1rem;
2020-05-09 07:19:04 +00:00
fill: currentColor;
}
blockquote {
2020-05-11 15:59:06 +00:00
margin: 2rem 1rem;
2020-05-09 07:19:04 +00:00
}
blockquote footer {
display: block;
width: 100%;
2020-05-12 08:31:55 +00:00
}
/* Form controls */
button {
background: unset;
border: var(--foreground) solid 1px;
color: var(--foreground);
cursor: pointer;
font-size: 1rem;
padding: 0.5rem;
2020-05-09 07:19:04 +00:00
}
2020-05-11 15:59:06 +00:00
/* Semantic blocks */
2020-05-12 08:31:55 +00:00
aside {
--vertical-rhythm-reduction: 0.2;
color: var(--grey);
border: 1px solid var(--grey);
border-left: 3px solid var(--grey);
font-size: calc(1rem * (1 - var(--vertical-rhythm-reduction)));
2020-05-13 18:54:02 +00:00
font-family: var(--header-family);
2020-05-12 08:31:55 +00:00
line-height: calc(1rem * (1 + var(--vertical-rhythm-reduction)));
margin: 1rem 0;
padding: 0.5rem;
width: 100%;
}
2020-05-11 15:59:06 +00:00
footer {
display: flex;
justify-content: space-evenly;
align-items: center;
flex-flow: column wrap;
}
2020-05-09 07:19:04 +00:00
/* Layout styles. */
.site__title {
display: inline-block;
2020-05-12 08:31:55 +00:00
font-size: 2rem;
2020-05-11 15:59:06 +00:00
margin-bottom: 1rem;
margin-right: 0.5rem;
2020-05-09 07:19:04 +00:00
}
.site__links {
display: inline-block;
}
2020-05-12 08:31:55 +00:00
.site__languages {
display: inline-block;
}
2020-05-09 07:19:04 +00:00
.site__theme-btn {
position: absolute;
right: 0;
top: 0;
2019-09-20 16:11:12 +00:00
}
.pagination {
display: flex;
font-size: 1rem;
list-style: none;
justify-content: center;
margin: 1.2rem 0;
padding: 0.8rem;
}
.pagination > * {
margin: 0 0.25em;
text-decoration: none;
}
.page-link {
background: var(--background-light);
color: var(--foreground-light);
text-decoration: none;
padding: 0.5em;
}
.page-link:visited {
color: var(--foreground-light);
}
.page-link--active {
font-weight: bolder;
}
.page-link:hover {
background: var(--foreground);
color: var(--background);
2019-09-20 16:11:12 +00:00
}
.post {
2020-05-11 15:59:06 +00:00
margin-top: 1rem;
2020-05-09 07:19:04 +00:00
}
.post h1 {
margin: 0 auto;
}
.post__meta {
color: var(--grey);
display: inline-block;
margin: 0.5rem auto;
font-size: 0.9em;
}
.post__meta--single {
color: var(--grey);
font-size: 0.9em;
margin: 0.5em auto;
}
.post__meta--single > * {
margin: 0.5em auto;
}
.post__meta > :not(:first-child)::before {
content: "|";
margin-left: 0.5em;
margin-right: 0.5em;
}
.taxonomy__header {
display: flex;
align-items: center;
justify-content: start;
}
.taxonomy__header > * {
margin: 0;
margin-right: 0.25em;
}
.taxonomy__pages {
list-style: none;
padding-left: 1em;
margin: 1em auto;
}
.taxonomy__page {
display: flex;
}
.taxonomy__page :first-child {
white-space: nowrap;
2020-05-09 07:19:04 +00:00
}
.taxonomy__page > * {
margin-right: 0.5em;
}
2020-05-09 07:19:04 +00:00
/* Mobile styles */
2020-05-13 18:54:02 +00:00
@media all and (max-width: 860px) {
2020-05-09 07:19:04 +00:00
html:root {
2020-05-13 18:54:02 +00:00
--font-size: 17px;
2020-05-09 07:19:04 +00:00
}
2019-09-20 16:11:12 +00:00
}