erick.is/static/styles.css

171 lines
2.2 KiB
CSS

html {
font-family: sans-serif;
color: #444;
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
max-width: 800px;
margin: 0 auto;
padding: 1rem 2rem;
}
blockquote {
background-color: #eee;
border-left: 3px solid #555;
margin: 1rem -1rem 1rem calc(-1rem - 3px);
padding: 1rem;
}
ul {
margin-top: 1.5rem;
margin-bottom: 2rem;
margin-left: 0;
padding: 0;
}
li {
padding: 0;
margin: 0;
}
p:has(img) {
text-align: center;
}
img {
max-width: 80%;
}
a {
position: relative;
}
a,
a:hover,
a:active,
a:visited {
text-decoration: none;
}
a:before {
content: '⇒';
color: #999;
font-weight: bold;
position: absolute;
left: -1.25rem;
}
a:has(img):before {
content: '';
}
pre {
margin: 1.5rem -1rem 2rem;
background-color: #eee;
padding: 1rem;
overflow-x: auto;
}
article {
line-height: 1.5rem;
}
h1 {
margin-top: 2.5rem;
margin-bottom: 1.5px;
font-size: 1.3rem;
}
h2 {
margin-top: 2.5rem;
font-size: 1.2rem;
}
h3 {
font-size: 1.1rem;
}
p {
margin-bottom: 1.5rem;
}
p:nth-last-of-type(2) {
margin-top: 2.5rem;
margin-bottom: 2.5rem;
opacity: 0.6;
}
p:has(a) {
margin-top: 0rem;
margin-bottom: 0.25rem;
}
details:not([open]) summary,
details:not([open]) summary a {
color: gray;
}
details summary a:before {
display: none;
}
dl dt {
font-weight: bold;
}
dl dt:not(:first-child) {
margin-top: 0.5rem;
}
@media (prefers-color-scheme: dark) {
html {
background-color: #111;
color: #eee;
}
blockquote {
background-color: #000;
}
pre {
background-color: #222;
}
a,
a:hover,
a:active {
color: #0087bd;
}
a:visited {
color: #333399;
}
}
label {
display: block;
font-weight: bold;
margin-bottom: 0.5rem;
}
input {
display: block;
border: 1px solid #888;
padding: 0.375rem;
line-height: 1.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
width: 100%;
}
input:focus {
outline: 0;
border-color: #80bdff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}