Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions assets/css/content/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,35 +71,26 @@
font-weight: 400;
}

/* Headings
Summary, Callbacks and Functions sections output h1 and h2,
which we style as h2 and h3. */
.content-inner {
--h1-size: 1.5rem;
--h2-size: 1.35rem;
--h3-size: 1.25rem;
--h4-h5-size: 1.15rem;
--h6-size: 1rem;

& h1 {
font-size: var(--h1-size);
font-size: 1.5rem;
margin-top: 1.75em;
}

& h2 {
font-size: var(--h2-size);
font-size: 1.35rem;
margin-top: 1.5em;
margin-bottom: 0.5em;
}

& h3 {
font-size: var(--h3-size);
font-size: 1.25rem;
margin-top: 1.5em;
margin-bottom: 0.5em;
}

& :is(h4, h5, h6) {
font-size: var(--h4-h5-size);
font-size: 1.15rem;
margin-top: 1.25em;
margin-bottom: 0.5em;
}
Expand All @@ -109,14 +100,22 @@ which we style as h2 and h3. */
}

& h6 {
font-size: var(--h6-size);
font-size: 1rem;
}
}
@container content (width > 600px) {
.content-inner {
--h1-size: 2rem;
--h2-size: 1.75rem;
--h3-size: 1.45rem;
& h1 {
font-size: 2rem;
}

& h2 {
font-size: 1.75rem;
}

& h3 {
font-size: 1.45rem;
}
}
}

Expand Down
9 changes: 1 addition & 8 deletions assets/css/layout.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
/* Layout container contexts */

#main {
container: content / inline-size;
}

/* Layout styles */

html,
body {
box-sizing: border-box;
Expand Down Expand Up @@ -70,6 +62,7 @@ body {
}

.content .content-inner {
container: content / inline-size;
max-width: var(--content-width);
min-height: 100%;
margin: 0 auto;
Expand Down