From 322928ed7afc7f26ea2caa1d379ff93987e079df Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Fri, 8 Aug 2025 01:28:28 -0500 Subject: [PATCH] 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 --- assets/css/bobastyle.css | 85 ++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index eb25c1e..427ad30 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -166,41 +166,8 @@ pre > code { /* }}} */ -/* Basic elements {{{ */ -html { - 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; -} +/* Common elements {{{ */ img, video { @@ -240,6 +207,12 @@ a:hover { text-decoration: underline; } +/* this is also used i.e. in page-title */ +.heading-link { + color: inherit; + text-weight: bold; +} + blockquote { border-left: 5px solid var(--background-2); 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 */ -.heading-link { - color: inherit; - font-weight: bold; +html { + 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; } /* }}} */ @@ -645,7 +646,7 @@ table.simple tbody tr:nth-child(even) { /* }}} */ -/* Content (single) formatting {{{ */ +/* Components exclusive to content/single pages {{{ */ .series-box { background-color: var(--background-1); @@ -885,8 +886,6 @@ aside.quote { /* }}} */ -/* }}} */ - /* Related posts section {{{ */ .full-width-page-list { @@ -922,6 +921,8 @@ aside.quote { /* }}} */ +/* }}} */ + /* @media specializations {{{ */