Repository navigation
Draw a caption's shadows behind its outline - #15
Merged
Merged
Conversation
The outline moved to Paint; the shadow, glow and long shadow stayed as CSS `text-shadow` on the word. A shadow is cast by the thing that carries it, and what carried it was the body — so the shadow landed on the ring instead of under it. Every recipe here pairs a dark outline with a dark shadow, which is the only reason it was not obvious. They are Paint now too, declared before the stroke, because layers draw in the order they are named. `text-shadow` paints its list the other way round — the first named is on top — so the order reverses on the way across: the far end of the long shadow first, then the glow, then the drop shadow nearest the letter. The long shadow is already computed as discrete steps, and each step is one shadow layer, which is what a long shadow is. Blur had to be converted, not copied. CSS blur is a radius and covers about two deviations; the filter takes a deviation. Passing the authored number straight through would have doubled every shadow and glow in the repository. Measured through the real pipeline with a blue unblurred shadow offset ten pixels under a red outline: 1184 shadow pixels survive, and of the 351 columns carrying ink, zero are capped by the shadow. In front of the ring it would have shown its whole silhouette, around nine thousand. Naming filters after the Track and Present as well as the Paint meant every word carried its own copy of definitions that were byte-identical. A five-word caption with an outline, a glow and a long shadow emitted eighty definitions of sixteen distinct filters — thirty-six kilobytes, seven of them not repeated. A filter's content depends on its Paint alone, so its name does too, and the document writes each one once: eighty definitions became sixteen, and the ordinary case is two. Co-Authored-By: Claude <[email protected]>
overlordkim
pushed a commit
that referenced
this pull request
Sep 9, 2026
Draw a caption's shadows behind its outline
overlordkim
pushed a commit
that referenced
this pull request
Sep 9, 2026
Draw a caption's shadows behind its outline
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The outline moved to Paint in #14; shadow, glow and long shadow stayed as CSS
text-shadowon the word element. A shadow is cast by whatever carries it, and what carried it was the glyph body — so the shadow landed on top of the ring instead of underneath it. Every recipe in the repository pairs a dark outline with a dark shadow, which is the only reason it did not show.They are Paint now as well, declared before the stroke, since layers draw in the order they are named.
Two things that needed care
Order reverses on the way across.
text-shadowpaints its list front to back — the first shadow named is the one on top — while Paint layers draw back to front. So the far end of the long shadow is declared first, then the glow, then the drop shadow nearest the letter. The long shadow was already computed as discrete steps and each step becomes one shadow layer, which is what a long shadow is.Blur is converted, not copied. CSS blur is a radius and covers roughly two standard deviations;
feGaussianBlurtakes the deviation. Passing the authored number straight through would have doubled every shadow and glow in the repository.Measured
Rendered through the real pipeline with an unblurred blue shadow offset ten pixels beneath a red outline:
In front of the ring the shadow would have shown its whole silhouette, on the order of nine thousand pixels, and would have capped columns.
Filter definitions were being repeated
Naming a filter after the Track and Present as well as the Paint meant every word carried its own copy of byte-identical definitions. A five-word caption with an outline, a glow and a long shadow emitted 80 definitions of 16 distinct filters — 36 KiB, of which 7 were not repetition. A filter's content depends on its Paint alone, so its name now does too, and the document writes each one once.
Verification
pnpm check,pnpm test(544, 0 failures),pnpm test:release(8) andpnpm test:browser-visual(12 against a real browser) all pass.🤖 Generated with Claude Code