Files
blazestar.net/src/styles/global.css

219 lines
4.6 KiB
CSS

/*
The CSS in this style tag is based off of Bear Blog's default CSS.
https://github.com/HermanMartinus/bearblog/blob/297026a877bc2ab2b3bdfbd6b9f7961c350917dd/templates/styles/blog/default.css
License MIT: https://github.com/HermanMartinus/bearblog/blob/master/LICENSE.md
*/
:root {
--color-gold: #e99c1a;
--color-space-blue: #1c2329;
--color-space-blue-light: #2a3138;
--color-gray: #7f8c8d;
--color-light-text: #dcdcc6;
--color-red: #d75422;
--color-accent: var(--color-red);
--background: var(--color-space-blue);
--background-light: var(--color-space-blue-light);
--font-size-sm: calc(var(--font-size-md) / 1.2);
--font-size-md: 20px;
--font-size-lg: calc(var(--font-size-md) * 1.2);
--font-size-xl: calc(var(--font-size-lg) * 1.2);
--font-size-2xl: calc(var(--font-size-xl) * 1.2);
--font-size-3xl: calc(var(--font-size-2xl) * 1.2);
--font-size-4xl: calc(var(--font-size-3xl) * 1.2);
}
@font-face {
font-family: "Atkinson";
src: url("/fonts/atkinson-regular.woff") format("woff");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Atkinson";
src: url("/fonts/atkinson-bold.woff") format("woff");
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Fira Code";
src:
url("/fonts/FiraCode-Light.woff2") format("woff2"),
url("/fonts/FiraCode-Light.woff") format("woff");
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: "Fira Code";
src:
url("/fonts/FiraCode-Regular.woff2") format("woff2"),
url("/fonts/FiraCode-Regular.woff") format("woff");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Fira Code";
src:
url("/fonts/FiraCode-Medium.woff2") format("woff2"),
url("/fonts/FiraCode-Medium.woff") format("woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "Fira Code";
src:
url("/fonts/FiraCode-SemiBold.woff2") format("woff2"),
url("/fonts/FiraCode-SemiBold.woff") format("woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: "Fira Code";
src:
url("/fonts/FiraCode-Bold.woff2") format("woff2"),
url("/fonts/FiraCode-Bold.woff") format("woff");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: "Fira Code VF";
src:
url("/fonts/FiraCode-VF.woff2") format("woff2-variations"),
url("/fonts/FiraCode-VF.woff") format("woff-variations");
/* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */
font-weight: 300 700;
font-style: normal;
}
body {
font-family: "Atkinson", sans-serif;
margin: 0;
padding: 0;
text-align: left;
word-wrap: break-word;
overflow-wrap: break-word;
color: var(--color-light-text);
font-size: var(--font-size-md);
line-height: 1.7;
background-color: var(--color-space-blue);
}
main {
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0 0 0.5rem 0;
line-height: 1.2;
}
/* Progressive 1.2x scaling from the base */
h1 {
font-size: var(--font-size-4xl);
}
h2 {
font-size: var(--font-size-3xl);
}
h3 {
font-size: var(--font-size-2xl);
}
h4 {
font-size: var(--font-size-xl);
}
h5 {
font-size: var(--font-size-lg);
}
strong,
b {
font-weight: 700;
}
a {
color: var(--color-accent);
}
a:hover {
color: var(--color-accent);
}
p {
margin-bottom: 1em;
}
.prose p {
margin-bottom: 1em;
}
textarea {
width: 100%;
font-size: 16px;
}
input {
font-size: 16px;
}
table {
width: 100%;
}
img {
max-width: 100%;
height: auto;
border-radius: 8px;
}
code {
font-family: "Fira Code", monospace;
background-color: var(--background-light);
padding: 0.1em 0.2em;
}
pre {
padding: 1.5em;
border-radius: 8px;
}
pre > code {
all: unset;
}
blockquote {
border-left: 4px solid var(--accent);
padding: 0 0 0 20px;
margin: 0px;
font-size: 1.333em;
}
hr {
border: none;
border-top: 1px solid rgb(var(--gray-light));
}
@media (max-width: 720px) {
body {
font-size: 18px;
}
main {
padding: 1em;
}
}
.sr-only {
border: 0;
padding: 0;
margin: 0;
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
/* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
clip: rect(1px 1px 1px 1px);
/* maybe deprecated but we need to support legacy browsers */
clip: rect(1px, 1px, 1px, 1px);
/* modern browsers, clip-path works inwards from each corner */
clip-path: inset(50%);
/* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */
white-space: nowrap;
}