gmi-web/gmi.css

182 lines
2.9 KiB
CSS
Raw Normal View History

2020-12-11 23:22:09 +00:00
:root {
--body-width: 48rem;
2021-01-28 06:16:46 +00:00
--foreground: black;
--background: white;
--p-size: 1.25rem;
--p-indent: 0rem;
2021-01-29 06:15:23 +00:00
--p-line-height: 1.5;
2021-01-28 06:16:46 +00:00
--a-size: var(--p-size);
--pre-size: 1rem;
2021-01-29 06:15:23 +00:00
--pre-line-height: 1;
2021-01-28 06:16:46 +00:00
--h1-size: 3rem;
--h2-size: 2.25rem;
--h3-size: 1.5rem;
2021-01-29 06:15:23 +00:00
--heading-line-height: 1.25;
2021-01-28 06:16:46 +00:00
--ul-size: var(--p-size);
2021-01-29 06:15:23 +00:00
--ul-line-height: 1.25;
2021-01-28 06:16:46 +00:00
--blockquote-size: var(--p-size);
2021-01-29 06:15:23 +00:00
--blockquote-line-height: 1.25;
2021-01-28 06:16:46 +00:00
--mono: Consolas, monaco, monospace;
--serif: georgia, times, serif;
--sans-serif: -apple-system, BlinkMacSystemFont, "avenir next", avenir,
helvetica, "helvetica neue", ubuntu, roboto, noto, "segoe ui", arial,
sans-serif;
2020-12-11 23:22:09 +00:00
}
body {
max-width: var(--body-width);
2021-01-28 06:16:46 +00:00
padding: 0.5rem;
margin: 0 auto;
2020-12-11 23:22:09 +00:00
}
2021-01-28 04:12:11 +00:00
2021-01-28 06:16:46 +00:00
p,
a,
pre,
h1,
h2,
h3,
ul,
blockquote,
img,
audio,
video {
display: block;
max-width: 100%;
margin: 0;
padding: 0;
overflow-wrap: anywhere;
2021-01-28 04:12:11 +00:00
}
2020-12-11 23:22:09 +00:00
h1,
h2,
h3 {
2021-01-28 06:16:46 +00:00
font-family: var(--sans-serif);
2021-01-29 06:15:23 +00:00
line-height: var(--heading-line-height);
2020-12-11 23:22:09 +00:00
}
p {
2021-01-28 06:16:46 +00:00
font-size: var(--p-size);
font-family: var(--serif);
text-indent: var(--p-indent);
2021-01-29 06:15:23 +00:00
line-height: var(--p-line-height);
2020-12-11 23:22:09 +00:00
}
a::before {
2021-01-28 06:16:46 +00:00
font-size: var(--p-size);
font-family: var(--mono);
content: "⇒";
padding-right: 0.25rem;
vertical-align: middle;
2020-12-11 23:22:09 +00:00
}
a {
2021-01-28 06:16:46 +00:00
font-size: var(--p-size);
font-family: var(--serif);
text-decoration: none;
2020-12-11 23:22:09 +00:00
}
2021-01-28 04:12:11 +00:00
pre {
2021-01-28 06:16:46 +00:00
font-size: var(--pre-size);
font-family: var(--mono);
2021-01-29 06:15:23 +00:00
line-height: var(--pre-line-height);
2021-01-28 06:16:46 +00:00
padding: 1.25rem;
overflow-y: auto;
2021-01-28 04:12:11 +00:00
}
h1 {
2021-01-28 06:16:46 +00:00
font-size: var(--h1-size);
2021-01-28 04:12:11 +00:00
}
h2 {
2021-01-28 06:16:46 +00:00
font-size: var(--h2-size);
2021-01-28 04:12:11 +00:00
}
h3 {
2021-01-28 06:16:46 +00:00
font-size: var(--h3-size);
2020-12-11 23:22:09 +00:00
}
ul {
2021-01-28 06:16:46 +00:00
font-size: var(--p-size);
font-family: var(--serif);
2021-01-29 06:15:23 +00:00
line-height: var(--ul-line-height);
2021-01-28 06:16:46 +00:00
list-style-type: none;
2020-12-11 23:22:09 +00:00
}
2021-01-28 04:12:11 +00:00
li::before {
2021-01-28 06:16:46 +00:00
font-size: var(--p-size);
font-family: var(--mono);
content: "*";
vertical-align: middle;
padding-right: 0.5rem;
2021-01-28 04:12:11 +00:00
}
2020-12-11 23:22:09 +00:00
blockquote {
2021-01-28 06:16:46 +00:00
font-size: var(--p-size);
font-family: var(--serif);
2021-01-29 06:15:23 +00:00
line-height: var(--blockquote-line-height);
2021-01-28 06:16:46 +00:00
padding-left: 0.75rem;
2020-12-11 23:22:09 +00:00
}
2021-01-28 06:16:46 +00:00
pre + blockquote {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
2020-12-11 23:22:09 +00:00
}
2021-01-28 00:09:27 +00:00
/* foreground and background colors */
2021-01-28 06:16:46 +00:00
html,
2021-01-28 04:12:11 +00:00
body,
2021-01-26 00:54:35 +00:00
h1,
h2,
h3,
p,
a,
ul,
2021-01-28 04:27:44 +00:00
blockquote,
pre::selection,
pre::-moz-selection {
2021-01-28 06:16:46 +00:00
color: var(--foreground);
background-color: var(--background);
2021-01-26 00:54:35 +00:00
}
blockquote {
2021-01-28 06:16:46 +00:00
border-left: 0.5rem solid var(--foreground);
2021-01-26 00:54:35 +00:00
}
2021-01-28 04:12:11 +00:00
pre,
2020-12-11 23:22:09 +00:00
::selection,
2021-01-28 04:12:11 +00:00
::-moz-selection,
2021-01-26 00:54:35 +00:00
a:hover {
2021-01-28 06:16:46 +00:00
color: var(--background);
background-color: var(--foreground);
2021-01-26 00:54:35 +00:00
}
2021-01-28 00:09:27 +00:00
/* when system preference is "dark" invert foreground and background colors */
2021-01-26 00:54:35 +00:00
@media (prefers-color-scheme: dark) {
2021-01-28 06:16:46 +00:00
html,
body,
h1,
h2,
h3,
p,
a,
ul,
blockquote,
pre::selection,
pre::-moz-selection {
color: var(--background);
background-color: var(--foreground);
}
blockquote {
border-left: 0.5rem solid var(--background);
}
pre,
::selection,
::-moz-selection,
a:hover {
color: var(--foreground);
background-color: var(--background);
}
2021-01-26 00:54:35 +00:00
}