« get me outta code hell

css: I am once again going crazy over borders and shadows - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/css
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-03-14 10:08:48 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-03-14 10:08:48 -0300
commitda563e9900ba56f9efb1d63254a21131411e8bf3 (patch)
tree4c2f56b2ea49700057cf926c6174c6c353c32c30 /src/static/css
parente6b0777d51c8c93be233b18a075c921d0b2642c1 (diff)
css: I am once again going crazy over borders and shadows
Diffstat (limited to 'src/static/css')
-rw-r--r--src/static/css/site.css45
1 files changed, 36 insertions, 9 deletions
diff --git a/src/static/css/site.css b/src/static/css/site.css
index 17b3c600..303277d9 100644
--- a/src/static/css/site.css
+++ b/src/static/css/site.css
@@ -61,13 +61,18 @@ body::before, .wallpaper-part {
 
 #page-container {
   max-width: 1100px;
-  margin: 0 auto 38px;
-  padding: 15px 0;
+
+  margin: 0 auto 40px;
+  padding: calc(15px - var(--page-border-width)) 0;
+
+  --page-border-width: 0;
+  border: var(--page-border-width) solid transparent;
+  box-sizing: border-box;
 }
 
 #page-container > * {
-  margin-left: 15px;
-  margin-right: 15px;
+  margin-left: calc(15px - var(--page-border-width));
+  margin-right: calc(15px - var(--page-border-width));
 }
 
 #skippers:focus-within {
@@ -83,9 +88,9 @@ body::before, .wallpaper-part {
 }
 
 #banner {
-  margin: 10px 0;
-  width: 100%;
+  margin: 10px calc(-1 * var(--page-border-width));
   position: relative;
+  z-index: 2;
 
   --banner-shine: 4%;
   -webkit-box-reflect: below -12px linear-gradient(transparent, color-mix(in srgb, transparent, var(--banner-shine) white));
@@ -252,6 +257,16 @@ body::before, .wallpaper-part {
 
 /* Design & Appearance - Layout elements */
 
+@property --box-opacity {
+  /* This property rule doesn't actually do anything in practice.
+   * It just lets us see the effective value of --box-opacity
+   * in browser CSS inspectors.
+   */
+  syntax: "<number>";
+  inherits: true;
+  initial-value: 0.6;
+}
+
 :root {
   color-scheme: dark;
 
@@ -291,11 +306,23 @@ body::before, .wallpaper-part {
       calc((var(--box-opacity, 0.6) - 0.6) * 40%));
 
   color: #ffffff;
-  border-bottom: 2px solid #fff1;
+
+  --page-border-width: 0.5px;
+  border-bottom-width: 1px;
+  border-radius: 4px 4px 5px 5px;
+
+  border-color: #f7f7f733;
+  border-color:
+    rgba(
+      144, 144, 144,
+      calc(0.4 + 0.5 * (var(--box-opacity) - 0.6) / 0.4));
+
   box-shadow:
     0 0 40px #0008,
-    0 2px 15px -3px #2221,
-    0 2px 6px 2px #1113;
+    0 20px 15px -4px #0002,
+    0 6px 15px -3px #2221,
+    0 4px 6px 2px #1113,
+    0 1px 4px 1px #1114;
 }
 
 #skippers > * {