3 ms·
This also breaks naive/literal search. For an example, copy and paste the "After" text into VSCode and try to search for "taking", "coladas", or "Exhibits". It
by starkparker 2y ago
This also breaks naive/literal search. For an example, copy and paste the "After" text into VSCode and try to search for "taking", "coladas", or "Exhibits". It won't match because of the ligatures.
Browser search can typically parse Unicode ligatures, so it's not a huge usability problem. But saving, copying, or scraping the output and using tools that don't process ligatures into their component letters will fail.
This also (very slightly, but still notably) abuses empty contentless <span>s to inject space through CSS margins.
Also, the attempt to brute-force small caps by applying a font subset via a span doesn't work at all for me, in either Chrome or Firefox.
It's a good effort, but I also can't think of a use case where the result is worth what this does to the markup.