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

257 lines
3.9 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;
/* Spacing options. */
2020-05-12 08:31:55 +00:00
--font-size: 20px;
2020-05-11 15:59:06 +00:00
--vertical-rhythm: 24px;
--content-width: 900px;
--border-style: var(--foreground) solid 1px;
2019-09-20 16:11:12 +00:00
}
2020-05-11 15:59:06 +00:00
[data-theme="dark"]:root {
2020-05-12 08:31:55 +00:00
--foreground: #FAFAFA;
--foreground-light: #E1E1E1;
2020-05-09 07:19:04 +00:00
--background: #000000;
--background-light: #363537;
--grey: #919191;
}
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-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-12 17:41:43 +00:00
dd{
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 {
2020-05-09 07:19:04 +00:00
background: var(--background-light);
2019-09-20 16:11:12 +00:00
border: var(--background) solid 1px;
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)));
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 {
list-style: none;
display: flex;
justify-content: space-evenly;
padding: 0;
2020-05-11 15:59:06 +00:00
margin: 1rem;
2019-09-20 16:11:12 +00:00
}
.post {
2020-05-09 07:19:04 +00:00
align-items: center;
2019-09-20 16:11:12 +00:00
display: flex;
justify-content: space-between;
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 > * {
2020-05-11 15:59:06 +00:00
margin: 0.5rem auto;
2020-05-09 07:19:04 +00:00
}
/* Mobile styles */
@media (max-width: 860px) {
html:root {
2020-05-11 15:59:06 +00:00
--font-size: 18px;
2020-05-09 07:19:04 +00:00
}
.post {
align-items: unset;
flex-flow: column;
2020-05-11 15:59:06 +00:00
margin-bottom: 1rem;
2020-05-09 07:19:04 +00:00
}
2019-09-20 16:11:12 +00:00
}