Settings

Theme

Towards a more perfect link underline

acusti.ca

63 points by acusti · 38 comments

Reader

9 threads
TheLoneWolfling

I really do not like this.

It breaks the assumption (wrong word? Intuitive guess?) that one underline == one link.

Which means that every time I look at the link I do a doubletake trying to figure out why there are 6+ links in that word.

  • psychometry

    Maybe there's something wrong with your browser. The underline style is only interrupted slightly for descenders. It continues through spaces and other punctuation like it does normally. It looks nothing like a phrase with each word underlined individually.

    • garrettgrimsley

      There's nothing wrong with their browser, they are talking about a single word, not phrase, being composed of multiple links.

      As HN does not support markup I'll attempt to demonstrate with underlines. Imagine that each slice seperated by underlines is a seperate link.

      _Su_p_ercalifra_g_alisticex_p_ialdocious_

      • psychometry

        The only characters that introduce separation in a standard typeface are the ones with descenders: q, y, p, g, j, and some punctuation characters.

        I have no idea why you think i_f, r_a, c_e, or almost any of the other pairs of letters in your example would have a discontinuous underline.

        • garrettgrimsley

          Edited, better?

          They are saying that currently if there is a break in the underline it is understood that the two underlined portions of the word are two different links.

  • wmeredith

    I see your point, but I have a counter assumption that individual letters without spaces between will not ever be linked that cancels it out for me.

    • bobbykjack

      Yes, pretty poor usability to link two words only separated by a space, but terrible usability to extend that to linking two adjacent characters separately.

  • HackinOut

    When looking at the example, it did not grasp my attention because it's rare to have links broken in the middle of a word. It did though with words starting with the letter y for example. Too bad because it looks awesome.

    Worth noting that a continuous line can hide several links. The security conscious that likes to hover links before clicking them know this well, hence I always appreciate the use of a css :hover that would also somewhat attenuate that problem. (http://jsfiddle.net/46qvv6kn/)

  • dredmorbius

    That's among the reasons I generally ad an on-hover very slight background color shift to links. It allows me to see what the boundaries of a link are before clicking it. I also dispense with the underline on links by default.

    The following is from what I call my "unstyled" CSS -- I'll apply it to bare-bones HTML websites.

        a {
            color: #1e6b8c;
            text-decoration: none;
            transition-property: color, background-color;
            transition-duration: 0.3s;
            transition-timing-function: linear;
            transition-delay: 0.1s;
        }
    
        a:visited {
            color: #6f32ad;
    
        }
    
        a:hover {
            text-decoration: underline;
            background: #f0f0ff;
        }
    
        a:active {
            background-color: #427fed;
            color: #fffff6;
        }
    • danielnixon

      Your a:hover styles should also be applied to a:focus [0]. You might also want to read about why using only color to differentiate links is bad practice [1].

      [0] http://www.456bereastreet.com/archive/201004/whenever_you_us...

      [1] http://www.w3.org/TR/WCAG20-TECHS/F73.html

      • dredmorbius

        Most of my work has a single highly specific consumer: me. I'll restyle websites to remove distractions and improve clarity, focus, and readability. I do this very nearly as casually as breathing now (Chrome, Element Inspector, and Stylebot FTFW).

        If you'll apply those styles to a page, you'll find that:

        * Links are colored. Blue colorblindness is quite rare. That's arguably a far better choice than the orange/red links I'm seeing more frequently now. For myself, I find underlines distracting.

        * On hover they're underlined and the background cover shifts.

        * On click, foreground and background colors are inverted.

        Your point on :focus vs. :hover is probably well-taken, though those have been equivalent for my use.

        I've encountered a number of sites with disappearing sub-menus (themselves an arguably broken UI element), where the rule for visibility is :hover of the/a parent element. Which means that when the pointer moves off the parent and onto the submenu, the submenu disappears. LinkedIn has been exhibiting this recently.

  • acustiOP

    Fair enough. Of course, the counterpoint is that for others who do not have that particular reaction, the overall effect of having less intersecting lines (better separation between characters and text decorations) is one of less clutter, and, arguably, heightened readability.

  • dec0dedab0de

    I don't like it either, but mostly because descenders, are supposed to go through the line. That's one of the first things you learn in kindergarden when you're learning to print.

jamesgagan

another recent blog post on this topic with some nice examples: http://eager.io/blog/smarter-link-underlines/

SixSigma

I still prefer Wired's transparent ones

see examples http://www.wired.com/2014/11/2014-physics-gift-guide/

JoshTriplett

I actually do find this to be an improvement for underlining of text as a visual style, such as for emphasis or headings. (Which you should never do on the web, specifically because "underline" means "link" and nothing else; however, in non-hypertext, underlining can work as a visual style.)

However, as a style for links, it has a sufficiently different style that I find it distracting, both from . appearing far too faint to stand out, and from introducing breaks in the line. It isn't nearly as bad as sites that hide link underlines entirely, however.

zkhalique

http://research.microsoft.com/en-us/um/people/lamport/pubs/b...

The whole premise of this paper about Buridan's ass principle is wrong. That is to say, its assumption of continuity. A simple strategy of "always go to the right after you haven't made a firm decision after X time" leads to a discontinuous function, violating their assumption. It is trivially possible for strategies to lead to discontinuous decision functions, undermining the whole idea.

The author tries to report that "you aren't sure if you've decided or not after X time", but doesn't go very deeply into it, and clings to the assumption of continuity. In fact, one can always be sure whether they've made a FIRM decision or not by a certain time, in the same way the author has X_t(1) = 1 for all t.

username223

Anyone whose website looks like this [1] has no business complaining about underlines.

[1] http://i.imgur.com/Y1MAsHt.png

  • acustiOP

    Sorry if I gave the impression I was complaining about underlines.

    My personal website is a playground for ideas; it is not a product anyone payed me to build, and it is not intended to sell anything. The fixed semi-transparent nav is an attempt to balance my annoyance with fixed navs that break page down/page up functionality with the utility of having quick access to useful links (use case being “interesting post, who is this person?” or “what else have they done?”). I don’t love it, and it’s pretty bad at mobile widths, but it has the distinct advantage of preventing readers from losing their place when paging. Another commenter picked up on that: https://news.ycombinator.com/item?id=8679336

    Anyways, I appreciate the criticism. Though I heartily disagree that as a result of that expirement, I cannot write about improving text underlining on the web.

    • username223

      A floating sidebar would still be mildly annoying, but much better than the awful header nonsense. The New York Times has plenty of money to throw at web designers, but still breaks my space bar (wiggling the pointer around after hitting SPC mostly makes it work). Please don't encourage this terrible behaviour elsewhere.

  • harlanlewis

    I actually tried to reproduce that screenshot. Consider me trolled.

    If your intention was to be helpful in any way (always a safe assumption with username223), you could have at least said what browser you use.

    • username223

      > If your intention was to be helpful in any way (always a safe assumption with username223), you could have at least said what browser you use.

      In a half-hearted attempt to atone for my sins...

      My browser is Safari blocking some JavaScript and most ads. Your floating header-menu-thingy is completely transparent, but won't disappear. Floating headers generally break page-down, so they're a terrible idea. But if you use them, at least make them opaque so people can figure out the breakage.

      • harlanlewis

        Thank you for details!

        I'm not the article author or site creator, I'm just OCD about the myriad ways a seemingly simple page can fail to render.

mattxxx

lgtm

I really like the selection color-change, but I'm not sold on the actual CSS :/

It's too bad line-height doesn't work so great, because that feels like a great solution.

  • acustiOP

    Do you mean border bottom in conjunction with reduced line-height as a solution for link underlines? Or something else?

    • mattxxx

      Yes, I meant border-bottom in conjunction with line-height. It feels more connected to the idea of "underline" than adding a line-gradient.

  • wmeredith

    lgtm?

zobzu

I find the "regular" underline a LOT more readable and ensure im seeing an hyperlink... IMO readability should always trump "being pretty".

  • smorrow

    Especially since "pretty" often means tacky or garish. I see alot of comments in here where people like the look of the thing but don't like the gaps in the context of something you're going to click on. Me, I just don't like the look. itself. For some reason, my eye is seeing the text as being "in front" of the underline, instead of the desired effect which would be the underline getting out of the text's way.

jamesmcq24

Just seems a little nit-picky to me. I can't help thinking there are more important things to implement than little gaps around letter descenders and configurable line thickness in text underlines...

  • psychometry

    Just because there are more important things to do worry about than one particular thing doesn't mean no one on earth should worry about that thing until everything else is fixed.

    I really need to vacuum my car, but maybe I should hold off until we resolve the Ebola outbreak?

    • jamesmcq24

      I'm not sure that example is the same, I'd say a better example would be "I really need to fix the giant hole in my roof, but maybe I should hold off until I find the perfect position of the pillows on my bed"

      EDIT: But sure, the fact that there are other things to do doesn't mean no one should worry about anything else. I just feel like this is one of those things that doesn't really make any meaningful change, add any value, etc. Like I said, just seems like nit-picking. To each their own.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection