Tell HN: The “Y” logo in the top-left corner has been upgraded to SVG
news.ycombinator.com
news.ycombinator.com
We collab'ed on it together (more praise for dang as if he needs it -- he was incredible through and through) and I'm so happy to see it live!!
I built two micro tools to help nail it down if anyone is curious (aka make it visually seamless):
https://gregsadetsky.github.io/yc-logo-svg-comparison-editor...
https://gregsadetsky.github.io/yc-vote-button-editor/
(check the top right of both pages to see the UI controls)
Uh... AMA? Suggestions? Thoughts?
Thanks for the support -- so far nobody hates it? Does anyone hate it?
Cheers!
Manually tracing the favicon in Inkscape (and correcting what I believe to be an unintentional asymmetry) gives me this: https://news.ycombinator.com/item?id=35894797
The vote buttons look great. I noticed-but-didn't-notice after seeing this post.
EDIT: vs. the favicon, on my screen, the new version is "bolder" as well.
"A" for effort and constant improvement and all that, but iteration required, I think.
A weird observation: At first, I didn't know how the "the Y is too fuzzy" problem (that I never had) could have been solved with a visibly much fuzzier replacement (shouldn't even say fuzzier, since the original was unfuzzy for me). Then I realized, I think it might have to do with solving the "fuzzy when zoomed" problem, without sufficiently regression testing the "do not degrade the non-zoomed look" checkbox. And, maybe SVG is good for large images, but not great for tiny ones (like this "Y" at 1x). Or something like that. I never zoom HN, so the fix does nothing for me, but I do notice the regression. I hope the feedback can be integrated somehow.
I’ll try to collect all notes and follow up on them. Thanks for this!
The top of the "Y", at least optically, doesn't seem to extend as far in the PNG, and the intersection of the top legs seems to start higher in the SVG - it looks much higher in the 1x, IMO. I'm sure part of this is just the challenge/inherent mismatch of using a vector to "match" a lossy-compressed raster depiction of text.
That said I did this for fun and I don't imagine it will ever bother me - the sharpness is nice! Thank you!
Thanks for dropping in. It looks… unsettling! Like any UI change.
I am sure we will look back on the old page as it appeared someday and wonder how anyone tolerated such a thing.
My question is: how long was it bothering you before you emailed dang? How did you put it forward? Was it essentially an email version of a bug report?
I wrote an email which felt like throwing a bottle to the sea - this is/was a very non urgent issue. I described what was going on, included screenshots, and I did a prototype of an svg version which I also included.
As an active-ish member of this community, it felt nice to try to make it 0.000001% better ha :)
thank u
<svg>
<text class="logo">Y</text>
</svg>
Or even just <span class="logo">Y</span> with the style providing color and border.And the arrows could be text too: 🞁 and 🞃.
Just curious about why even make them images, given the note that "everything else is text, and scaled perfectly!"
Parent comment used much newer characters 🞁 and 🞃, BLACK {UP/DOWN}-POINTING ISOSCELES RIGHT TRIANGLE (U+1F781, U+1F783). These were added in Unicode 7, June 2014, where the others have been around for thirty years. I’m mildly surprised at lack of font support on macOS. For me they’re being rendered with Noto Sans Math, and completely wrong: they’re not being drawn as right-angled triangles at all (the angle is about 53° rather than 90°)! I’m guessing the commenter also had a bad font on them, because as a right angle it’d look all wrong for this purpose. (I’ve filed a bug report at https://github.com/notofonts/math/issues/47. Curiously, Noto Sans Symbols 2 also includes the character and gets its shape right, but Noto Sans Math is higher in the font fallback list (`fc-match sans-serif --all`: 881 lines, NotoSansMath-Regular.ttf is 52nd and NotoSansSymbols2-Regular.ttf is 89th.)
There are also ⯅ and ⯆, BLACK {UP/DOWN}-POINTING TRIANGLE CENTRED (U+2BC5, U+2BC6). And more, but of roughly-these-sized ones, these are the ones.
There are lots of triangles in Unicode.
There are lots of triangles and also arrows, so commonness of font support would definitely be something to be careful of.
It all appears to be Verdana, which has near 100% support across Windows and Mac.
https://www.cssfontstack.com/Verdana
I think the parent's solution (given the simple nature of the logo), is the best way to go.
news.ycombinator.com##.votearrow:style(margin-bottom:12px !important;)
I've also added the following lines to highlight comments that I've upvoted or downvoted to make it easier to see: news.ycombinator.com##a[id^="un"]:has-text(unvote):upward(4):style(border-left: 1ch solid green !important; padding-left: 1ch !important;)
news.ycombinator.com##a[id^="un"]:has-text(undown):upward(4):style(border-left: 1ch dotted red !important; padding-left: 1ch !important;)My only suggestion is to optimise it, which we have :) (Lifting this from lower down in the thread). The following SVG fragment is a drop in replacement for the <img> tag and produces the same result, albeit completely symmetrical as a side effect of quantising the coordinates:
<svg width="18" height="18" viewBox="-32 -32 64 64"
style="background: #f60; border: 1px white solid;">
<path fill="#fff" d="m0-5l-8-12h-7L-3 1v16h6V1l12-18H8z"/>
</svg>
This reduces the total payload from 1448 bytes to 172 bytes including whitespace (I ungolfed it slightly to make it less hacky). By comparing both the inline <img> tag, and the svg file and it's HTTP header (which disappears when you inline).That said, if working entirely by hand, using elementary shapes can be easier to write and understand (I think); here's an attempt with using one rectangle three times for the Y (and another rectangle to mask the edges at the top):
<svg width="18" height="18" viewBox="-32 -32 64 64"
style="background: #f60; border: 1px white solid;">
<rect x="-3" y="-2" width="6" height="24" fill="white" id="rc1"/>
<use href="#rc1" y="-22" transform="rotate(-34) scale(1, 1.2)" id="rc2"/>
<use href="#rc2" transform="scale(-1,1)"/>
<rect x="-30" y="-30" width="60" height="12" fill="#f60"/>
</svg><svg width="18" height="18" viewBox="-32 -32 64 64" style="background:#f60;border:1px #fff solid;"><rect x="-3" y="-2" width="6" height="24" fill="#fff" id="rc1"/><use href="#rc1" y="-22" transform="rotate(-34) scale(1, 1.2)" id="rc2"/><use href="#rc2" transform="scale(-1,1)"/><rect x="-30" y="-30" width="60" height="12" fill="#f60"/></svg>
Is it really worth it? Is it?!?!
But the other side of this is cache latency, this depends on the caching policy defined in the http header, for example some modes require validating caches with the server which incurs a round trip even if it doesn't require always reloading the resource. If it's fully offline caching then as a sibling comment pointed out, disk caching is not free either, under some threshold (which definitely applies here) inline is going to be the fastest way to get an svg rendering.
"Ungolfed" in this context means that it was cleaned up to make it more readable, at the expense of adding a few more bytes to the size.
more advanced minifiers do that as well, but the point remains, as a historical artifact because until we have AGI, there's still a difference between if a person did it vs a human
I personally also use 'unminified' to refer to a horrible person that doesn't care about anyone else maintaining their code doing the same thing, like they're manually minifying their code to obscure it from their colleagues and future selves.
I wanted to make that definition more popular as there is no reason to write unsearchable code that requires someone else to maintain a mental map of meaningless names to their actual meanings while reading code.
A lot of people (you're one, nothing personal, but I explained this already in a parent comment) don't realize I'm deliberately calling attention to bad behavior and just think I'm confused though. I'll swap to ungolfed.
<svg viewBox="-32-32 64 64">
<path fill="#f60" d="m-31-31H31V31H-31z M0-5l-8-12h-7L-3 1v16h6V1l12-18H8z"/>
</svg> <path fill="white" d="M-32-32 h64 v64 h-64 z"/>
Spaces can be deleted of course. .rotate180 {
-webkit-transform: rotate(180deg); /* Chrome and other webkit browsers */
-moz-transform: rotate(180deg); /* FF */
-o-transform: rotate(180deg); /* Opera */
-ms-transform: rotate(180deg); /* IE9 */
transform: rotate(180deg); /* W3C complaint browsers */
/* IE8 and below */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-1, M12=0, M21=0, M22=-1, DX=0, DY=0, SizingMethod='auto expand')";
}
on smaller screens (@media only screen and (min-width : 300px) and (max-width : 750px)) you additionally get: .votearrow { transform: scale(1.3,1.3); margin-right: 6px; }
.votearrow.rotate180 {
-webkit-transform: rotate(180deg) scale(1.3,1.3); /* Chrome and other webkit browsers */
-moz-transform: rotate(180deg) scale(1.3,1.3); /* FF */
-o-transform: rotate(180deg) scale(1.3,1.3); /* Opera */
-ms-transform: rotate(180deg) scale(1.3,1.3); /* IE9 */
transform: rotate(180deg) scale(1.3,1.3); /* W3C complaint browsers */
}
same scale, thoughNow that the Y is SVG rather than being an image, it shouldn't be too tricky to adjust the background color from orange to whatever the user has set for their topbar? I use blue for the topbar, and it kind of annoys me that the logo stays orange.
Heck, my instinct tells me that if we're lucky a transparent background would do the job without needing to make the SVG dynamically defined.
Edit: I see you're drawing the background color over the Y to give it flat tops. That makes the transparent background difficult. But I'd still like it if the background color was taken from the user's topcolor instead of always being orange.
You should see a field labeled `topcolor`. You can set the color of the topbar through that.
Huh I would have thought they'd have some sort of document somewhere that gives clear dimensions and angles of the logo. Did someone just draw that freehand in Photoshop, saved it to png and then that was that?
I'll say as someone who began on HN feeling contrarian and somewhat underepresented in viewpoint that dang is exceptionally responsive to all manner of suggestions. Not all have been implemented, though a few I've suggested have been picked up. Collapsable comments being one that comes to mind.
Hacking on HN itself can be fun. (I've got a few CSS tweaks linked from my profile page, so far no take-up, though I much prefer how the site looks using them.) That includes a dark mode, which though I don't usually use it, testing just now ... it's not bad if I may say so myself.
Your SVG tweak reminds me that it's possible to do such things in CSS (inline data attributes) as well.
<svg viewBox="0 0 64 64">
<path d="m1 1v62h62v-62z" fill="#f60" stroke="#fff" stroke-width="1"/>
<path id="|" d="m32 28v28" stroke="#fff" stroke-width="8"/>
<use transform="rotate(120 32 28)" xlink:href="#|"/>
<use transform="rotate(240 32 28)" xlink:href="#|"/>
</svg>I don't expect many people will have these issues, I know I'm running in a very locked down environment that most people wouldn't want to put up with, and it shouldn't be very hard for me to fix this with a little custom css, I just thought I'd give the feedback since I was impacted and I do try to encourage sites to fail gracefully.
While it's fine and funny to be doing so - I can't help but realize how little any of this matters. Imagine an alternate reality where the icon was changed for SVG and not announced. There might be 2 people max that complain about it for a day, and then it would blow over and be the new normal.
Also imagine if a whole stylistic remake of the website was done - I doubt anyone would notice if the icon was ever so slightly different.
Reminds me of memes about how a 10 line PR gets 10 comments, but a 1,000 line PR gets an "LGTM"
<?xml version="1.0" encoding="utf-8"?>
<svg viewBox="0 0 100 100" width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="100" height="100" fill="rgb(255, 102, 0)"></rect>
<path d="M 50 77 L 50 50 " fill="none" stroke="rgb(255, 255, 255)" stroke-width="8.78662150719729" stroke-linecap="butt">
</path>
<path d="M 94.93056731583404 35.622745513916016 L 71.2454833984375 71.2454833984375 " fill="none" stroke="rgb(255, 255, 255)" stroke-width="8.78662150719729" stroke-linecap="butt" transform="matrix(1 0 0 1 -21.2455 -21.2455)">
</path>
<path d="M -78.93056731583404 36.17028045654297 L -55.67118835449219 71.79300689697266 " fill="none" stroke="rgb(255, 255, 255)" stroke-width="8.78662150719729" stroke-linecap="butt" transform="matrix(1 0 0 1 105.396 -21.7213)">
</path>
<rect transform="" width="100" height="23.742591024555463" stroke-width="1" stroke="none" fill="#FF6600" stroke-opacity="1" fill-opacity="1" stroke-linecap="butt" stroke-linejoin="miter" >
</rect>
</svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#F60" d="M0 0h100v100H0z"/><path fill="none" stroke="#FFF" stroke-width="8.79" d="M50 77V50m23.69-35.62L50 50M26.47 14.45l23.25 35.62"/><path fill="#F60" d="M0 0h100v23.74H0z"/></svg>There are also a bunch of things that are just the result of it being automatically generated by some vector package, such as the transforms, separate paths, masking of a bunch of strokes rather than just flattening the shape etc.
<svg viewBox="-32 -32 64 64" xmlns="http://www.w3.org/2000/svg"><path fill="#f60" d="M-32-32h64v64h-64z"/><path fill="#fff" d="m0-5l-8-12h-7L-3 1v16h6V1l12-18H8z"/></svg> <svg viewBox="-32 -32 64 64" width=18 height=18><path fill=#f60 d="M-32-32h64v64h-64z"/><path fill=#fff d="m0-5l-8-12h-7L-3 1v16h6V1l12-18H8z"/></svg><svg viewBox="-32 -32 64 64" style="background: #f60"><path fill="#fff" d="m0-5l-8-12h-7L-3 1v16h6V1l12-18H8z"/></svg>
<svg viewBox="-32-32 64 64" style="background:#f60"><path fill="#fff" d="m0-5-8-12h-7L-3 1v16h6V1l12-18H8z"/></svg>On the other hand, the spec[2] does specify whitespace or commas between the viewbox numbers.
I rescind my 115 claim and reset it back to 116.
[1] https://github.com/svg/svgo/issues/12
[2] "a list of four numbers <min-x>, <min-y>, <width> and <height>, separated by whitespace and/or a comma"
<svg viewBox="-32 -32 64 64" style="background:#f60;fill:#fff"><path d="m0-5-8-12h-7L-3 1v16h6V1l12-18H8z"/></svg>Safari, Chrome, and Firefox are all perfectly happy with it but then rsvg-convert chokes on all of those changes. 114 is probably the best that can be done and still be "conforming" (for want of a better word.)
If this wasn't intentional, here's a symmetrical version:
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="100" height="100" fill="#FF6600"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M62.1762 23.7426H72.6857L54.3948 51.6515V76.9391H45.6048V51.6554L27.3143 23.7426H37.8233L49.9988 42.3233L62.1762 23.7426Z" fill="white"/>
</svg>[0] https://hn.algolia.com/?query=y18.gif&type=all
[1] https://news.ycombinator.com/item?id=21544141 ("Can whoever is in charge of HN's site design convert this to an SVG image?" 'octosphere, 3 years ago)
Now if the mobile view could space items out a touch more so I don't periodically fat thumb the tiny flag/hide article links it would be perfect!
I check mine every now and then, and I always find some I fat fingered.
It drives me NUTS that I am adding noise to this system.
https://gist.github.com/selcuk/00948de9717b25d0d5e824c3e80da...
EDIT: since we're code golfing/bikeshedding, here's my own attempt, which matches the original proportions [1].
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 192 192">
<rect x="4" y="4" width="188" height="188" fill="#f60" stroke="#fff" stroke-width="8"/>
<path d="m 57,47 h 15 l 24,50 24,-50 h 15 L 102,109 v 40 H 90 v -40 z" fill="#fff"/>
</svg>
[1] Actually, the original is slightly asymmetric -- the right leg is slightly narrower. I've "corrected" this, making the right leg mirror the left. m57 47h15l24 50 24-50h15l-33 62v40h-12v-40zI suspect many people use HN (and similar) this way.
It's always a fun time when I occasionally use the browser/website "as intended" and hit the back button, but the scroll position has been completely lost so it takes a bit to find the exact place I was looking originally.
Truly incredible developments.
▲ U+25B2 BLACK UP-POINTING TRIANGLE
▼ U+25BC BLACK DOWN-POINTING TRIANGLE
[0] https://en.wikipedia.org/wiki/Geometric_Shapes_(Unicode_bloc...<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path fill="#F60" d="M0 0h100v100H0z"/><path d="M50 77V50M73.685 14.377 50 50M26.465 14.449l23.26 35.623" fill="none" stroke="#FFF" stroke-width="8.787"/><path fill="#F60" d="M0 0h100v23.743H0z"/></svg>
Wonder if it can be made any smaller?
<div style=“background-color:orange;color:white;border:1px solid white”>Y</div>
?Disclaimer: from memory and tongue in cheek. May not work!
https://svgplayground.com/#encodedsvg=PHN2ZyB3aWR0aD0iMTAwIi...
[0] https://validator.w3.org/nu/?doc=https%3A%2F%2Fnews.ycombina...
How SVG is still not the default for site logos is beyond me.
Can we get a yaml or json based image format or maybe some rust based web assembly to get on with the times?
Also, the top of the border line of the icon is not aligned with the "Hacker News" on mobile. It displays similarly to the desktop page zoomed in at 250%.
White square border looks good though.
1920 x 1080 on Firefox, plain orange square even more so on the browser tabs.
Seconded, it feels like the spacing between the Y and the borders is a bit too large. I would make the Y a bit thicker.
Other than that, it looks good. Voting arrows particularly so. I have memories of browsing HN on the TV at >200% zoom, the logo was very blurry in that situation.
Remember when Hacker News was the final fortress of the internet where content was king, and design was as minimalistic as the wardrobe of a monastic hermit? A place where intellectuals could congregate without being assaulted by the visual diarrhea that characterizes every other website on the planet. Those were the days when it was the text that mattered, not the tiny, shiny icons. But alas, those days are as dead as dial-up!
Once you start prioritizing style over substance, it's a downhill race on a greased slide. Today, it's just an innocuous favicon. But who's to say tomorrow we won't be suffering through animated logos, retina-burning background images, and God knows what other visual atrocities? Before we know it, we'll be swimming in a sea of unnecessary UI elements, auto-playing videos that nobody asked for, and a homepage that's more ad than actual content.
And they say progress is a good thing...
However, it's important to remember that design and aesthetics are also a part of the user experience, and can contribute to usability and accessibility. A favicon, for instance, can make it easier to distinguish between tabs in a browser, improving navigation and efficiency. While it's true that overdoing it with design elements can lead to clutter and distract from the content, there is a balance to be struck.
Your concerns about this being a slippery slope towards a more ad-heavy, visually cluttered site are understandable. However, it's also possible that the addition of a favicon is merely a small design tweak to improve usability, rather than a sign of a larger shift in priorities.
Ultimately, it's crucial that the community voices these concerns and helps steer the direction of the platform. After all, it's the users who make a platform like Hacker News what it is, and their input should be valued and considered.
SVG doesn't change the way positioned text does.
The raster 'Y' is definitely more acute than the new one. The vertex is lower. But those old voting arrows look terrible now.
[0] https://web.archive.org/web/20230201012035/https://news.ycom...
date: Thu, 11 May 2023 01:32:07 GMT
last-modified: Wed, 10 May 2023 21:41:52 GMT
A day old. You were quick to notice, wow.``` <a class="logo" href="https://news.ycombinator.com">Y<span class="sr">combinator Logo</span></a> ``` ``` .logo { display: block; width: 18px; background: #ff6601; border: 1px solid white; color: white; text-align: center; ```
or were you thinking about having dang actually implement changes to the site natively
a[href='https://news.ycombinator.com'] img,
display: none !important;
}
These can be managed with a plugin like Stylish.