TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Smarter Link Underlines For Every Website

113 pointsby adamschwartzover 10 years ago

16 comments

fuzz_junketover 10 years ago
It&#x27;s a very nice idea — I always like smartening up the look of the Web — but the resulting links are ghastly. If your word starts or ends with a descending letter (e.g. &quot;ghastly&quot;), then the underline looks like it omits the first and last letters. It breaks the semantics of what the underline means — any bit that&#x27;s underlined is supposed to be the link, and if it&#x27;s not underlined it&#x27;s not a link.<p>They also made the mistake of showing a link that includes the word &quot;Typography&quot;, which has an underline so broken up and interrupted that it&#x27;s distracting (which devindotcom also pointed out). It&#x27;s linked, then it&#x27;s not, then it&#x27;s linked, then it&#x27;s not!<p>So yeah, I have to give them credit for a good idea and a clever implementation, but it just doesn&#x27;t work out in the end.
评论 #8588036 未加载
评论 #8588250 未加载
评论 #8588515 未加载
devindotcomover 10 years ago
To me, it actually adds visual complexity while eliminating the useful visual cue of a single line being a single link. Here, there are many lines, which to me indicate many links. In some cases, the line may present as dotted or dashed (the word &quot;piggy&quot; randomly came to mind) — things that signify something other than a link to me.<p>I would rather descenders weren&#x27;t subsumed by the line either, but interrupting the element itself instead seems like as much as a problem as it is a solution.
评论 #8587858 未加载
评论 #8589563 未加载
评论 #8587856 未加载
adamschwartzover 10 years ago
In order to more accurately compare iOS 8 Safari’s text-decoration underline implementation to SmartUnderline, I created a test page. [1] It contains five links to the words gesture, quitting, discovery, piggy, and eager, set in Helvetica.<p>To produce the iOS 8 version, I opened the page in Safari on iOS 8.1 pinched zoomed to the maximum amount while keeping all five links within the frame, and took a screenshot.<p>To produce the SmartUnderline version, I visited the SmartUnderline install page [2] in Google Chrome on Mac OS X, entered the test page URL, and clicked “Preview in a separate window”. With the screenshot from my iPhone opened next to the browser, I used Command+[+&#x2F;-] to zoom the browser until the font sizes were the same size, then took a screenshot.<p>Here are the results: [3].<p>To summarize, I believe iOS 8 has some advantages and some disadvantages, but to me there is no clear winner.<p>Some specific points in no particular order:<p>- iOS underline breaks are always vertical cuts. Since SmartUnderline uses text-shadow to “white-out” the underline, the cut-outs are in the shape of the glyph. To me, this looks better in the “g” in “eager”, but worse in the “q” in “quitting”.<p>- iOS 8 shows a line between a “g” and ”y” (as in ”piggy”) and SmartUnderline does not.<p>- SmartUnderline’s underline extends less far to the left of the first letter and right of the last letter. This looks better in “quitting” and potentially worse in ”discovery”.<p>- In general, SmartUnderline sets a little more space around each descender.<p>- Both implementations show no underline before or after a leading or trailing “g”.<p>- Both implementations show the underline very close to the left side of the “y” descender. I think improvements could be made here with both implementations.<p>[1]: <a href="http://jsfiddle.net/adamschwartz/hyyerbq4/show/light/" rel="nofollow">http:&#x2F;&#x2F;jsfiddle.net&#x2F;adamschwartz&#x2F;hyyerbq4&#x2F;show&#x2F;light&#x2F;</a><p>[2]: <a href="https://eager.io/app/eA9ULux0UOJP/install" rel="nofollow">https:&#x2F;&#x2F;eager.io&#x2F;app&#x2F;eA9ULux0UOJP&#x2F;install</a><p>[3]: <a href="http://postimg.org/image/nf9b2ahd1/" rel="nofollow">http:&#x2F;&#x2F;postimg.org&#x2F;image&#x2F;nf9b2ahd1&#x2F;</a> (@2x <a href="http://postimg.org/image/688ricy2v/" rel="nofollow">http:&#x2F;&#x2F;postimg.org&#x2F;image&#x2F;688ricy2v&#x2F;</a>)
评论 #8589016 未加载
评论 #8589075 未加载
heycamover 10 years ago
This kind of underline painting behaviour is proposed in <a href="http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-skip-property" rel="nofollow">http:&#x2F;&#x2F;dev.w3.org&#x2F;csswg&#x2F;css-text-decor-3&#x2F;#text-decoration-sk...</a> as text-decoration-skip:ink. Not yet implemented anywhere though.
Semiapiesover 10 years ago
Neat, though I don&#x27;t actually think I like the look of it. I think I&#x27;d rather have an underline further down, so that it&#x27;s below the descenders.
评论 #8587399 未加载
bltover 10 years ago
<i>&gt; First we define a helper mixin textShadowToCropUnderline which draws 12 text-shadows, half to the left, half to the right, spaced every .03em.</i><p>This seems like a big waste of CPU and memory. I don&#x27;t want to drain my phone&#x27;s battery rendering these underlines.
评论 #8588306 未加载
hftfover 10 years ago
I had seen this effect about two years ago on the website of Roman Komarov and was impressed by it at the time: <a href="http://kizu.ru/en/fun/" rel="nofollow">http:&#x2F;&#x2F;kizu.ru&#x2F;en&#x2F;fun&#x2F;</a>
评论 #8587802 未加载
crystalnover 10 years ago
While I admire the attention to detail, it is all in vain for me. I much prefer the simplicity of a solid line to the awkward fragments dodging descenders. My brain continuously tries to make sense of the incomplete line, and some words no doubt will add to the confusion with long stretches of characters having minimal expression of the underline.<p>Case in point, the word giggly has what appear to be specs of dust underneath.
spc476over 10 years ago
Why limit yourself to just underlining links? Why not some other convention? I played around with this a bit over a decade ago: <a href="http://www.conman.org/people/spc/writings/hypertext/fragment/" rel="nofollow">http:&#x2F;&#x2F;www.conman.org&#x2F;people&#x2F;spc&#x2F;writings&#x2F;hypertext&#x2F;fragment...</a> (note: In the twelve years since I wrote that, most of the links offsite are now dead, which is another issue with links).<p>At first, the links in the &quot;fragment&quot; are invisible. You can toggle among that, single angle quotes (not used in English, which is why I picked that option), small bullet points on either end, and the default HTML underline.
评论 #8588227 未加载
评论 #8587952 未加载
ddebernardyover 10 years ago
The library&#x27;s showcase page has the key bits imo:<p>&gt; - It makes an assumption about selection color, which is OS- and browser-dependent.<p>&gt; - Each smart-underlined link has 12 text-shadows drawn underneath it, which could potentially have performance penalties on mobile or older devices.<p><a href="https://eager.io/showcase/SmartUnderline/" rel="nofollow">https:&#x2F;&#x2F;eager.io&#x2F;showcase&#x2F;SmartUnderline&#x2F;</a><p>(Imho, the two points introduce enough risks and reasons to not use it and wait for OS- or browser-level updates instead.)
WiseWeaselover 10 years ago
This seems like something user agents should apply to all &#x27;underline&#x27; text-decoration by default in order to improve readability. Is there any reason not to?
评论 #8587810 未加载
评论 #8589020 未加载
ameliusover 10 years ago
This example shows once again that CSS is not a good declarative language: it provokes hacking. In this case, a hack has to be applied in every instance where this is needed.<p>Instead, if CSS were developed by actual language designers, it would have been possible to write this as a modularized thing, completely hiding the actual implementation.
bshimminover 10 years ago
Aside from the many other criticisms raised in the comments, this seems like something of a deal-breaker to me: &quot;It requires that the text be on top of a solid background color.&quot;
评论 #8590223 未加载
stonogoover 10 years ago
This seems like a hell of a lot of client-side processing just to enforce a trivial (and arguably bad) typography preference.
transfireover 10 years ago
Web 1.0 called and they want their underlined links back.
评论 #8587894 未加载
shetterover 10 years ago
That&#x27;s nice in theory, but it&#x27;s also yet another example of Apple innovating and getting it right, and people implementing a quick copy without going through nearly as much <i>necessary</i> design thinking as Apple did. The end result is that only Apple&#x27;s implementation is better than the default one. Of course I&#x27;m not blaming you personally for that, I mean, even Microsoft has fallen prey to this phenomenon (and on a vastly larger scale). But it would nice if people were more observant.
评论 #8587989 未加载