jtm.dev/assets/style/default.css

57 lines
1.4 KiB
CSS
Raw Normal View History

2020-08-30 15:26:18 -07:00
html {
/*
* The body does not span the entire viewport, so the background color must go in the `html`.
* This difference in behavior is not visible normally, but appears to be triggered by the Dark Reader plugin for Firefox.
2020-08-30 15:26:18 -07:00
*/
background-color: #fafafa;
}
body {
margin: auto;
2021-04-13 19:15:19 -07:00
/* I love me some easily-readable text. */
2020-08-30 15:26:18 -07:00
max-width: 60ch;
2021-04-13 19:15:19 -07:00
/* experimenting with a smaller font */
/* font: 1.4rem/1.8em sans-serif; */
font: 21px/1.5em sans-serif;
2020-08-30 15:26:18 -07:00
}
.icon-list img {
2021-04-13 19:15:19 -07:00
width: 30px;
height: 30px;
2020-08-30 15:26:18 -07:00
/* The icon should be located where the bullet would be. */
position: relative;
2021-04-13 19:15:19 -07:00
left: -30px;
2020-08-30 15:26:18 -07:00
/*
* The text doesn't know that the image isn't actually there, so it must be re-aligned with a negative margin.
* I don't move over the entire 1.3 em gap, because there needs to be space between the icon and text.
*/
margin-right: -1em;
}
/* My webcomic icons are favicon rips (for now) and look bad at large sizes. */
.icon-list.low-res img {
2021-04-13 19:15:19 -07:00
width: 23px;
height: 23px;
}
.icon-list.high-res img {
width: 64px;
height: 64px;
margin-top: 5px;
margin-bottom: 5px;
}
2020-08-30 15:26:18 -07:00
.icon-list li {
/* Vertically align the text w.r.t. the icon. This has the simultaneous effect of removing the list bullet. */
display: flex;
align-items: center;
}
@media (prefers-color-scheme: dark) {
img.svg-icon {
filter: invert(1);
}
}