-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a19236
commit eb514a2
Showing
2 changed files
with
248 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,245 @@ | ||
/* Font */ | ||
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@700,701,401,400&display=swap"); | ||
|
||
/* Settings */ | ||
:root { | ||
--color-dark: #1a1a1a; | ||
--color-light: #fafafa; | ||
--color-primary: #1a8fe3; | ||
--spacing: 1.5rem; | ||
--font-stack: "Satoshi", system-ui, -apple-system, BlinkMacSystemFont, | ||
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, | ||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | ||
--max-width: 1600px; | ||
} | ||
|
||
/* Dark mode settings */ | ||
@media (prefers-color-scheme: dark) { | ||
:root { | ||
--color-dark: #fafafa; | ||
--color-light: #1a1a1a; | ||
} | ||
} | ||
|
||
/* Basic styles */ | ||
body { | ||
background: var(--color-light); | ||
color: var(--color-dark); | ||
padding: 5vw; | ||
font-family: var(--font-stack); | ||
font-size: 1.5rem; | ||
line-height: 1.7; | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: calc(var(--spacing) * 2); | ||
min-height: 100vh; | ||
max-width: var(--max-width); | ||
margin: 0 auto; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
header, | ||
main, | ||
footer { | ||
max-width: 60ch; | ||
margin-inline: auto; | ||
width: 100%; | ||
} | ||
|
||
/* Header styles */ | ||
header { | ||
padding-bottom: var(--spacing); | ||
flex-basis: 12rem; | ||
flex-grow: 1; | ||
} | ||
|
||
/* Main content styles */ | ||
main { | ||
flex-basis: 0; | ||
flex-grow: 999; | ||
padding-bottom: calc(var(--spacing) * 2); | ||
flex-basis: 40rem; | ||
} | ||
|
||
/* Footer styles */ | ||
footer { | ||
min-width: 100%; | ||
flex-basis: 0; | ||
flex-grow: 1; | ||
padding-top: var(--spacing); | ||
} | ||
|
||
/* Link styles */ | ||
a { | ||
color: currentColor; | ||
text-decoration-color: var(--color-primary); | ||
text-decoration-thickness: 0.2ex; | ||
text-underline-offset: 0.3ex; | ||
} | ||
|
||
a:hover { | ||
text-decoration-thickness: 0.3ex; | ||
} | ||
|
||
/* Image styles */ | ||
img { | ||
display: block; | ||
max-width: 100%; | ||
height: auto; | ||
} | ||
|
||
/* Heading styles */ | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5 { | ||
font-weight: 700; | ||
line-height: 1.3; | ||
text-wrap: balance; | ||
} | ||
|
||
/* Adjustments for different heading levels */ | ||
h1 { | ||
font-size: 3.55rem; | ||
} | ||
|
||
h2 { | ||
font-size: 2.66rem; | ||
} | ||
|
||
h3 { | ||
font-size: 2rem; | ||
} | ||
|
||
h4 { | ||
font-size: 1.5rem; | ||
} | ||
|
||
h5 { | ||
font-size: 1.13rem; | ||
} | ||
|
||
/* List styles */ | ||
ul, | ||
ol { | ||
padding-inline-start: var(--spacing); | ||
} | ||
|
||
li { | ||
margin-block-start: var(--spacing); | ||
} | ||
|
||
/* Blockquote styles */ | ||
blockquote { | ||
padding-inline-start: var(--spacing); | ||
border-inline-start: 0.3em solid; | ||
font-style: italic; | ||
font-size: 1.5rem; | ||
} | ||
|
||
/* Flow and rhythm */ | ||
:is(h1, h2, h3, h4, h5, blockquote) { | ||
margin-block-end: calc(var(--spacing) / 2); | ||
} | ||
|
||
:is(h1, h2, h3, h4, h5)+* { | ||
margin-block-start: calc(var(--spacing) / 3); | ||
} | ||
|
||
:is(h1, h2, h3, h4, h5)+ :where(h2, h3, h4, h5) { | ||
margin-block-start: calc(var(--spacing) * 2); | ||
} | ||
|
||
/* Line lengths */ | ||
blockquote { | ||
max-width: 50ch; | ||
} | ||
|
||
h1 { | ||
max-width: 24ch; | ||
} | ||
|
||
h2, | ||
h3 { | ||
max-width: 32ch; | ||
} | ||
|
||
/* Bear Content */ | ||
.title { | ||
text-decoration: none; | ||
} | ||
|
||
.title h1 { | ||
font-size: 2rem; | ||
margin-top: calc(var(--spacing) / 2); | ||
} | ||
|
||
nav { | ||
position: sticky; | ||
top: var(--spacing); | ||
} | ||
|
||
nav p { | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
gap: var(--spacing); | ||
row-gap: 0; | ||
} | ||
|
||
@media screen and (min-width: 1000px) { | ||
nav p { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
ul.blog-posts { | ||
list-style-type: none; | ||
padding: unset; | ||
} | ||
|
||
ul.blog-posts li { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
@media screen and (min-width: 600px) { | ||
ul.blog-posts li { | ||
flex-direction: row; | ||
gap: calc(var(--spacing) / 2); | ||
} | ||
} | ||
|
||
ul.blog-posts li span { | ||
min-width: 11ch; | ||
} | ||
|
||
time { | ||
opacity: 0.5; | ||
font-style: normal; | ||
} | ||
|
||
.highlight, | ||
.code { | ||
padding: 1px var(--spacing); | ||
background-color: rgba(0, 0, 0, 0.1); | ||
border-radius: 3px; | ||
overflow-x: auto; | ||
line-height: 1.2; | ||
} | ||
|
||
table { | ||
width: 100%; | ||
} | ||
|
||
th { | ||
text-align: left; | ||
} | ||
|
||
hr { | ||
border-color: rgba(0, 0, 0, 0.1); | ||
} |