Reorganize CSS to have better sections

- Separate baseof.html elements from styling code for general elements
  used everywhere
- Rename some of the fold titles
- Include related posts section styling in the content styling section
This commit is contained in:
2025-08-08 01:28:28 -05:00
parent 4e753395ba
commit 322928ed7a

View File

@@ -166,41 +166,8 @@ pre > code {
/* }}} */ /* }}} */
/* Basic elements {{{ */
html { /* Common elements {{{ */
scroll-behavior: smooth;
}
@media screen and (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
body {
background-color: var(--background-0);
color: var(--text-0);
overflow-wrap: break-word;
margin: 0;
}
.main-container {
margin: var(--page-margin) auto;
/* use padding because otherwise there's no way to have margin be both auto, and a minimum value */
padding: 0 var(--page-margin);
max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */
}
footer {
margin: var(--page-margin) 0;
text-align: center;
font-size: smaller;
}
footer p {
margin: 0;
}
img, img,
video { video {
@@ -240,6 +207,12 @@ a:hover {
text-decoration: underline; text-decoration: underline;
} }
/* this is also used i.e. in page-title */
.heading-link {
color: inherit;
text-weight: bold;
}
blockquote { blockquote {
border-left: 5px solid var(--background-2); border-left: 5px solid var(--background-2);
padding-left: 15px; padding-left: 15px;
@@ -317,12 +290,40 @@ table.simple tbody tr:nth-child(even) {
/* }}} */ /* }}} */
/* Heading formatting (article section titles) {{{ */ /* Baseof formatting {{{ */
/* this is also used i.e. in page-title */ html {
.heading-link { scroll-behavior: smooth;
color: inherit; }
font-weight: bold;
@media screen and (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
body {
background-color: var(--background-0);
color: var(--text-0);
overflow-wrap: break-word;
margin: 0;
}
.main-container {
margin: var(--page-margin) auto;
/* use padding because otherwise there's no way to have margin be both auto, and a minimum value */
padding: 0 var(--page-margin);
max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */
}
footer {
margin: var(--page-margin) 0;
text-align: center;
font-size: smaller;
}
footer p {
margin: 0;
} }
/* }}} */ /* }}} */
@@ -645,7 +646,7 @@ table.simple tbody tr:nth-child(even) {
/* }}} */ /* }}} */
/* Content (single) formatting {{{ */ /* Components exclusive to content/single pages {{{ */
.series-box { .series-box {
background-color: var(--background-1); background-color: var(--background-1);
@@ -885,8 +886,6 @@ aside.quote {
/* }}} */ /* }}} */
/* }}} */
/* Related posts section {{{ */ /* Related posts section {{{ */
.full-width-page-list { .full-width-page-list {
@@ -922,6 +921,8 @@ aside.quote {
/* }}} */ /* }}} */
/* }}} */
/* @media specializations {{{ */ /* @media specializations {{{ */