3 ms·
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 enhanceme
by divbzero 5y ago
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.)
- dragonwriter 5y ago> 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.
- divbzero 5y agoI 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>