He programmed his site builder to insert two elements at the site of the punctuation:
<dquo-open-push></dquo-open-push> <dquo-open-pull> “That’s</dquo-open-pull>
and styles them with this CSS: dquo-open-push { margin-right: 0.5em }
dquo-open-pull { margin-left: -0.5em }
E.g. the first elements pushes the following element further back, but the second element pulls itself back in that negative margin. The resulting effect is that in normal flow both the positive and negative margin of these cancel each other out, leading to quasi normal inline flow: text text text text PUSH↔PULL text text
But if there is a line break between the elements the the push element pushes invisible into the right margin and the pull element pulls itself in the left margin, leading to hanging punctuation: text text text text text text PUSH→
←PULL text text text text text text
So the trick with negative margin not only works at the beginning of block elements but inside the inline flow without leading to a negative experience - e.g. it also works with unpredictable line lengths.An example is on this page: https://practicaltypography.com/are-two-spaces-better-than-o...
I really like the going of the extra mile, although now with `hanging-punctuation` it is unnecessary.
Note: Butterick programmed his own site builder - Pollen - and designs his own fonts - that makes such customisability more achievable, I assume. Not the biggest fan of using custom elements instead of span but modern HTML and web components makes this syntax valid.