Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't used links, but does it get the comment indentation properly?


I tried just now and it seems the answer is "no" on comment indentation. I don't see any indentation at all, everything is a flat list, left justified.

Edit: tried with elinks as well, same (more or less) thing. :-(


Same with lynx which is a bummer. I was half expecting HN’s <table> layout to work everywhere.


Looks like HN actually uses JavaScript to indent, based on a <td indent="n"> attribute where n is the level of indentation. So it’s more a progressive enhancement than something built into the underlying HTML.

(Edit: I think my initial take above was wrong. Please see below.)


> Looks like HN actually uses JavaScript to indent

I’m not an anti-JS person, but why? CSS seems so much more sensible for that.


I want to correct my initial take above. The JavaScript code I was looking at actually appears to show/hide children in threads.

The indentation appears to be handled separately by invisible GIFs:

  <td class="ind" indent="0">
    <img src="s.gif" height="1" width="0">
  </td>

  <td class="ind" indent="1">
    <img src="s.gif" height="1" width="40">
  </td>

  <td class="ind" indent="2">
    <img src="s.gif" height="1" width="80">
  </td>




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: