chiark / gitweb /
Add stylesheet to plain text files in .htaccess
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 19 Oct 2025 09:58:17 +0000 (10:58 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 13 Jan 2026 21:55:10 +0000 (21:55 +0000)
commitf8b7e0a91f03030f490cdab5edcd44d0a99c2d6c
tree76ded1f45066ef09169b115e1a8da58192c24d6f
parent2d27cef99878eaef9d48a05d0d9047a1b5a2269f
Add stylesheet to plain text files in .htaccess

It turns out that Firefox (version 140 at least) will happily use an
HTTP Link header for a CSS stylesheet on a plain text file.  It works
a bit weirdly because it applies the stylesheet to the HTML conversion
of the file, but that actually means that the existing bedstead.css
works pretty well.

This doesn't work on Chromium, but that's no worse than what we've
already got.
.htaccess