Skim v1.0.20 — "It's an email, not a stylesheet" 🎨
The one where Skim stops reading the CSS and starts reading the letter. A tiny release: one fix, one heuristic, zero new buttons. 🤏
🙌 Still standing on @gildas-refacto's shoulders
All of v1.0.19 was theirs — #30, their fourth merged PR after #16, #18 and #29, where they traced three separate translation bugs down to individual Unicode code points and measured every fix over 20 runs. 📐
Which made this release slightly embarrassing to write: they spent all that effort making the translation trustworthy, and it turns out we were sometimes not offering it at all. Fixed below. Thank you again. 💜
🐛 Fixed
-
The Translate chip shows up on mail that needs it. Some senders build their plain-text version by ripping the tags out of their own HTML —
<style>element included — so the email "text" opens with a few hundred characters of.bio{margin:auto}. Skim guesses the language from that text, and on one real newsletter 72% of the sample was CSS: the guess came back "not confident", and a perfectly English email got no translation offer in a Russian UI. Braces are not a language. 🧱Now a leaked stylesheet gets removed first — and since the language guess runs fresh on every open, mail already sitting in your database is fixed too, no resync required. ⚡
🧹 Also, quietly
- Message previews stop showing CSS. The same leak is why some rows in the list read
.bio .avatar{margin:auto 30px;width:fit-co…instead of, you know, words. Newly downloaded mail comes out clean. 👀 - Search stops indexing
font-size. Property names were going into the full-text index as if they were the sender's vocabulary. They were not. 🔎 - The AI stops paying for your newsletter's margins. Summaries, Ask and replies all read that same text, so every prompt was quietly buying a stylesheet. 💸
🎯 Deliberately narrow
- A block is only removed when both halves look like a rule — a real selector in front of the brace and a
prop: valuelist inside it. So{"total": 42},fn main() { let x = 1; }andstruct Order { id: u64 }survive untouched, and an email that actually discusses CSS keeps every character. There are tests pinning all of them, because gutting a code review to fix a newsletter would be a bad trade. 🧪 - CSS a message deliberately shows (inside
<pre>, say) is also left alone — the cleanup only touches the sender's own plain-text part.
🤫 Fine print
- Emails whose bodies were already downloaded keep their old braces-y preview line until the body is fetched again. The Translate chip, though, is back immediately. 🙃