- Changed: Make all color codes 3-char. Shave off a few bytes.
- Removed: all responsive layout besides the navigation links.
Everything else should work well at all window sizes without making
allowances for special cases.
- Removed: redundant CSS rules
- Added: centered images. Left-aligned images in a center-aligned column
of text break flow.
- Added: dark mode link colors for visited/active. Active link colors
give better a11y.
- Fix: don't show unnecessary scrollbar for <pre> blocks
Also put more comments in the source to explain why each rule is
important.
All this shrunk the CSS from 1065 bytes to 882 bytes (17% reduction)
- Text width was too wide on wide screens; reduce it.
- Make the nav-links' responsive layout for narrow viewports trigger at
a narrower window size. It used to trigger at 600px, but I made it
trigger at 32rem instead since the nav links aren't too wide. This
also handles cases where users' default sans-serif fonts are very
wide: rem measures by character width instead of pixels.
- Make the narrow-optimized multiline-navlinks the default, and make
widescreens a special case detected with a CSS media query.
Previously, widescreens were the default; however, this meant that
browsers that didn't support media queries (like dillo and netsurf)
couldn't switch to the multi-line navigation at narrow widths. This is
a good example of progressive enhancement; modern browsers will get
the same behavior as before, but the lowest common denominator will
see a better experience.
- Don't further reduce the max-width for narrow screens; narrow screens
are already narrow. We now have one less CSS rule.
Reduce Cumulative Layout Shift (CLS) by declaring original image
dimensions in HTML before re-scaling with CSS. This tells browsers the
image's aspect ratio before the image and the stylesheet load, allowing
browsers to block out space accordingly to avoid making elements "jump"
during loading.
More info: https://web.dev/optimize-cls/
- Dark mode: make navbar links the same color as regular links so as to
not hide the fact that they are links.
- Make navbar reflow at narrow window sizes
- Add links to gemini versions of HTML pages
- Fix footer link color
Also snuck in removal of scrollbar coloring. Why was that there in the
first place?
The sight of an animal using a JavaScript captivates Computer Scientists
and laymen alike, perhaps because it forces us to question some of our
ideas about human uniqueness.
Does the animal know how JavaScript works? Did it anticipate the need
for the tool and select it instead of Haskell or Zig?
To some, this fascination with JavaScript seems arbitrary and
anthropocentric; after all, animals engage in many other complex
activities, like Agile Planning and ordering Juice on the Internet.
However, we know that complex behaviour need not be cognitively
demanding.
JavaScript development can therefore provide a powerful window into the
minds of animals, and help us to learn what capacities we share with
them — and what might have changed to allow for the incontrovertibly
unique levels of technology shown by modern humans, such as integers and
block scope.