Summary Files Commits Branches @commit @diff @stats
path: root / src / styles.css
diff options
context:
space:
mode:
Commit714d8f3a5840b89120c0e95617f68af32cf6cb74 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-08-19 18:05:26 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-08-19 18:05:26 +0300
Files0bfbadc98760d037d921f29ec00ddd71cee308ce /src/styles.css
syndamia.com-714d8f3a5840b89120c0e95617f68af32cf6cb74.tar
syndamia.com-714d8f3a5840b89120c0e95617f68af32cf6cb74.tar.gz
syndamia.com-714d8f3a5840b89120c0e95617f68af32cf6cb74.zip
Parent9947229ee9d5d7f2f6e1d75765a71b326f7ce956 (diff)
feat(styles): Allow pages which are too short to properly shrink
Before, if a page (like src/teaching.html) was too short, we would get a whole lot of gray color after the article footer. Now we don't.
1 files changed, 9 insertions, 3 deletions
-rw-r--r--src/styles.css12
diff --git a/src/styles.css b/src/styles.css
index bfc9c3b..d0e9c41 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -93,7 +93,7 @@ body, td, th { font-size: 18px; font-family: 'Tabler', sans-serif; }
* add elements for helping with website usage, but which shouldn't be seen otherwise */
.nocss-aid { display: none; }
-nav, article { background-color: var(--bg-color); }
+nav, article > #article-container { background-color: var(--bg-color); }
/* Lists with line-separated items (ORDERED_LIST, UNORDERED_LIST) */
li > div:only-child,
@@ -179,11 +179,17 @@ article {
max-width: 56em; /* Equivalent to 50em on 19px font-size */
margin-bottom: 1em;
overflow: auto;
- padding: 0 1em;
margin-left: auto;
margin-right: auto;
}
+article > #article-container {
+ /* Top padding is 1.7em * 0.67em = (h1 font size) * (h1 default margin size) */
+ padding: 1.139em 1em 0 1em;
+}
+article > #article-container > h1:first-child {
+ margin-top: 0;
+}
.article-wide {
max-width: initial;
margin-left: initial;
@@ -299,7 +305,7 @@ a[rev="footnote"] { border: none; }
/*### Wrapper > Article > footer ###*/
-article > footer {
+article > #article-container > footer {
margin: 0 -1em;
padding: 0.5em;
border: 3px solid var(--accent-line-color);