aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-19 01:07:25 +0300
committergrm <grm@eyesin.space>2026-09-19 01:07:25 +0300
commit3a20156991bb9d5608de43173e60502a92320c48 (patch)
treea19f47ad2dc6a85690b800347c3616ffe78c45ef /internal
parentc42c56108ebac6673ec5c86f9f0d51f31e8eb2bd (diff)
downloadblogspace-master.tar.gz
blogspace-master.tar.bz2
blogspace-master.zip
Keep the header rule on phonesHEADmaster
The rule beside the title or logo was hidden under 700px so a long title could wrap, which left a small logo alone with empty space either side. The row is a flexbox on phones now: the brand wraps only when it must and the rules fill whatever is left, so a short title or a logo keeps its rule and a long title still wraps a word at a time and takes the whole row. Browsers without flexbox keep the table with a wrapping brand. A spread menu's links no longer justify their own words when one wraps inside. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal')
-rw-r--r--internal/web/static/blog.css13
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/web/static/blog.css b/internal/web/static/blog.css
index 7b91dbe..1c66c6e 100644
--- a/internal/web/static/blog.css
+++ b/internal/web/static/blog.css
@@ -10,7 +10,8 @@ img { max-width: 100%; height: auto; }
/* header rule: a line beside the title or logo (both sides when centred) filling
the rest of the row. Table cells, so the rule is as tall as the brand and old
browsers lay it out the same; the stripes are a gradient in currentColor (the
- header text colour). Wide screens only: on a phone a long title must wrap. */
+ header text colour). On phones the row is a flexbox instead (see the media
+ query): a long title must wrap, which a table would do one word per line. */
.ruled { display: table; width: 100%; }
.ruled > .brand, .ruled > .header-rule { display: table-cell; vertical-align: middle; }
.ruled > .brand { white-space: nowrap; padding: 0 1em; }
@@ -47,7 +48,7 @@ img { max-width: 100%; height: auto; }
that forced line from adding height, the links carry their own. A floated
search box just shortens the line. */
.nav-spread .site-header .nav-inner { text-align: justify; line-height: 0; }
-.nav-spread .site-header .nav-inner > a, .nav-spread .site-header .search-form { line-height: 1.5; }
+.nav-spread .site-header .nav-inner > a, .nav-spread .site-header .search-form { line-height: 1.5; text-align: left; } /* a link that wraps inside is not justified word by word */
.nav-spread .site-header .nav-inner::after { content: ""; display: inline-block; width: 100%; }
.body-wrap { padding: 1.5em 1em; }
.content { padding: 1.5em 2em; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
@@ -178,7 +179,13 @@ img { max-width: 100%; height: auto; }
.content { padding: 1em; }
.post-thumb { width: 40%; margin-left: 1em; }
.site-title { font-size: 1.5em; }
- .ruled > .header-rule { display: none; } .ruled > .brand { white-space: normal; }
+ /* the header rule keeps filling the row; the brand wraps only when it must
+ (min-content), and the rules take what is left. The rule is a column so
+ its line sits in the middle; the stripes are its whole height, as in the
+ table. Browsers without flexbox keep the table with a wrapping brand. */
+ .ruled { display: flex; }
+ .ruled > .brand { display: block; flex: 0 1 auto; white-space: normal; }
+ .ruled > .header-rule { display: flex; flex-direction: column; justify-content: center; flex: 1 1 0; }
.cols { display: block; }
.col-left, .col-right { padding: 0; margin-top: 1.5em; }
.col-left { order: 0; }