Repository navigation
Commit 58bc415
Give the model its own band on phones instead of hiding it behind the text
On a phone held upright the canvas filled the screen behind the lede at 34%
opacity, under a veil that was never less than 52% opaque, so the brain peaked
at about a sixth of its strength and sat directly behind the text. The whole
lower half of the first screen was empty.
In portrait below 1080px the canvas is now a band that starts just under the
last line of the lede and runs to the bottom of the screen, at full strength,
with no veil. Where that band begins depends on the phone's height, the width
the text wraps at, and whether the display face has loaded, so main.js measures
it rather than the stylesheet guessing, and re-measures on resize and once the
fonts are in. On very short screens the band keeps at least 240px and fades in
over its top fifth so the fiber emerges from the dark rather than crossing text.
As the reader scrolls, the band settles to a quiet trace by a third of a screen
down, since content is then passing over it. Delivering light raises it to 85%,
and 55% while recovering, so the control is never pressed at something that
cannot be seen.
The height is set explicitly rather than with top and bottom: a canvas is a
replaced element, so height: auto ignores bottom, takes the intrinsic aspect,
and the resize observer feeds that back into the drawing buffer.
Desktop and landscape are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent ec94583 commit 58bc415
2 files changed
Lines changed: 105 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
119 | 172 | | |
120 | 173 | | |
121 | 174 | | |
| |||
141 | 194 | | |
142 | 195 | | |
143 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
144 | 202 | | |
145 | 203 | | |
146 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
240 | 287 | | |
241 | 288 | | |
242 | 289 | | |
| |||
0 commit comments