« get me outta code hell

css: inset long-content pages a little lighter in thin layout - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-23 11:56:13 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-23 11:56:13 -0300
commita42078aed0805209ecb4724ea55a35e3909541dc (patch)
tree5f86b24fe84f9ebbe79eaffeb0b517830e98727d
parent1511c0b0fd35d4f368e72288d48958cb3eff778f (diff)
css: inset long-content pages a little lighter in thin layout
-rw-r--r--src/static/site5.css16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/static/site5.css b/src/static/site5.css
index b7f1b669..6076228b 100644
--- a/src/static/site5.css
+++ b/src/static/site5.css
@@ -689,10 +689,14 @@ p code {
   margin-bottom: 0;
 }
 
+main.long-content {
+  --long-content-padding-ratio: 0.12;
+}
+
 main.long-content .main-content-container,
 main.long-content > h1 {
-  padding-left: 12%;
-  padding-right: 12%;
+  padding-left: calc(var(--long-content-padding-ratio) * 100%);
+  padding-right: calc(var(--long-content-padding-ratio) * 100%);
 }
 
 dl dt {
@@ -1311,8 +1315,8 @@ main.long-content .content-sticky-heading-container {
 
 main.long-content .content-sticky-heading-container .content-sticky-heading-row,
 main.long-content .content-sticky-heading-container .content-sticky-subheading-row {
-  padding-left: calc(0.12 * (100% - 2 * var(--content-padding)) + var(--content-padding));
-  padding-right: calc(0.12 * (100% - 2 * var(--content-padding)) + var(--content-padding));
+  padding-left: calc(var(--long-content-padding-ratio) * (100% - 2 * var(--content-padding)) + var(--content-padding));
+  padding-right: calc(var(--long-content-padding-ratio) * (100% - 2 * var(--content-padding)) + var(--content-padding));
 }
 
 .content-sticky-heading-row {
@@ -1744,4 +1748,8 @@ html[data-language-code="preview-en"][data-url-key="localized.home"] #content
   #header > div:not(:first-child) {
     margin-top: 0.5em;
   }
+
+  main.long-content {
+    --long-content-padding-ratio: 0.04;
+  }
 }