61 points · by asdff · 5y ago · 54 comments
sub pre_format_html_hook {
my ($url, $html) = (shift, shift);
if ($url =~ m|news.ycombinator.com/item\?id=|) {
$html =~ s|<img src="s.gif" height="1" width="([0-9]{1,3})">|' 'x($1/10)|eg;
}
return $html;
}Appears to be browse-only though.
They're both written in arc by pg: http://www.arclanguage.org/
looks in inspect element
Me: I stand corrected
There’s not just weird 90s style table layout/spacer gifs, there’s also just random font tags and inline color attributes for important (eg branding) elements. Every downvote greying is inline color attributes.
I’d originally planned on a companion stylesheet for Algolia search and it was so different I just bailed.
Edit: honestly given the forum, I wish they’d open source some portion of HN to allow improvement. I really want a better mobile view, which is easily achievable with CSS without using the API and hosting another domain. If there’s so little interest in UX improvement effort this is something we could pick up the slack on.
The text-browser point made by the OP is the first that ran into this however most text browsers don't render the current 'best practice' (using CSS classes with margins) correctly either.
Lots of people notice, like OP and anyone using assistive technologies. So by your logic, it is bad design.
Lists should be marked up as lists, tabular data marked up as tables. We ended this debate in...1996?
If comments are nested unordered lists, why isn't the best practice a bunch of ul and li tags styled with CSS?
There is no need to use exploratory programming for such matters; it is a very common and well understood problem for which there are good and bad solutions.
A simple `margin-left: 20px;` in CSS is a good solution; transparent spacing images are ridiculous.
It wasn't CSS that killed this manner of formatting visual content, circa 2005-2010. It was lawyers as it isn't friendly to accessibility.
That is the point, and that is why it was changed.
The markup should reflect the structure and meaning of the document, so that accessibility tools and crawlers might better understand it.
Ideally, with all CSS and Javascript turned off, it should look as a plain, white, unintereseting, but otherwise usable website.