Nicu's Test Website Made with Svg (2007)
Posted4 months agoActive4 months ago
svg.nicubunu.roTechstoryHigh profile
calmpositive
Debate
20/100
SvgWeb DevelopmentVintage Web Design
Key topics
Svg
Web Development
Vintage Web Design
A 2007 SVG website is shared, sparking discussion about the capabilities and limitations of SVG in web development, as well as nostalgia for early web design.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
28m
Peak period
82
0-12h
Avg / period
24.3
Comment distribution97 data points
Loading chart...
Based on 97 loaded comments
Key moments
- 01Story posted
Sep 14, 2025 at 11:13 AM EDT
4 months ago
Step 01 - 02First comment
Sep 14, 2025 at 11:41 AM EDT
28m after posting
Step 02 - 03Peak activity
82 comments in 0-12h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 20, 2025 at 6:04 AM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45240391Type: storyLast synced: 11/20/2025, 4:44:33 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
If you aren't careful they can be used for XSS and all kinds of nasty stuff.
They are also super useful in general though despite that.
The only thing that separates it from html and css is that html and css biases towards website styled stuff. HTML is designed for text boxes and that kind of stuff while svgs bias more towards a neutral drawing medium: shapes and vectors.
So because it’s more neutral you can even make a html engine from svg if you so wanted.
Any time you drag over space between lines, it selects something else.
Yet another example of how maddening it still is when designing websites that have the same experience regardless of how it is viewed.
• Caret mode (F7) doesn’t work at all.
• Triple click selects all the text on the page, rather than just that of a single <text> element as I’d have expected (in which model you’d use <text> for a paragraph and <tspan> for its lines, and thus get the normal triple-click behaviour).
• Click and drag on a text link starts selection or drags the already-selected text, rather than dragging the link so you can drop it in a new tab or such. And if you mouse up on the same link (regardless of having left it), it activates.
• If you start a selection, it is only updated while you’re moving over text. Drag past the end of the line, then down, and it should select more text, but it only actually will when you move back over text.
• If text is selected, clicking outside text doesn’t clear the selection. (Probably the same root cause.)
• Shift+Up and Shift+Down select to the start or end of the containing <text> element, rather than operating linewise. (Because there’s no such thing logically, it’d require heuristic work. Or for people to implement flowed text, like Inkscape did but sadly then it was pulled out of the spec for some reason.)
There are also a couple of issues specific to this document:
• Document order is not sensible. For example, it goes title, then side nav title, then footer, then body text, then “Home”, then side nav contents, then magic keyword. But this does show a broader problem: in HTML it’s not the easiest to get stupid document ordering (possible, but you have to go a little out of your way), but in SVG it will happen unless you’re careful.
• Also likely to happen unless you’re careful: multiline text sometimes lacks the trailing spaces necessary to separate words once the line break is ignored (since there’s no such thing as a line break in SVG 1.1, only a shifted cursor position). For example, “Inkscapefor” fails, whereas “willing to” succeeds.
—⁂—
Chromium is interesting. Supports caret browsing (+), Up/Down do something weird (−), triple click only selects that <text> element (+), you can’t start a text selection in a link (±), but you can’t drag the link either (=), and while selecting, any time the pointer is not over text, it’ll shift that selection boundary to something like the start of the document (−), except it’s not actually the start because it excludes the title text for some reason.
https://www.google.com/search?q=svg.nicubunu.ro seems to surface it, with text; https://www.google.com/search?q=site:svg.nicubunu.ro gets the title, but no more text. I’m curious how it decided what the title was. I wonder if they have some kind of “choose the largest text” heuristic if a title is missing.
https://duckduckgo.com/?q=svg.nicubunu.ro and https://duckduckgo.com/?q=site:svg.nicubunu.ro don’t show a result.
It was so nice and unlocked so much creativity among early web developers. unfortunately Apple contributed to its demise
[1] https://www.cocos.com/en/cocos2d-x
[2] https://godotengine.org/
[3] https://pixijs.com/
[4] https://phaser.io/
* The charts are never blurry
* The text in the chart is selectable and searchable
* The file size could be small compared to PNGs
* The charts can use a font set by a stylesheet
* The charts can have a builtin dark mode (not demonstrated on my blog)
Additionally as the OP shown, the text in SVG is indexed by google, but comes up in the image sections [1].
The downside was hours of fiddling with system fonts and webfonts and font settings in matplotlib. Also the sizing of the text in the chart and how it is displayed in your page is tightly coupled and requires some forethought.
[0] https://aleyan.com/blog/2025-llm-assistant-census
[1] https://www.google.com/search?q=%22slabiciunea+lui+Nicu+fore...
[1] https://www.masswerk.at/6502/6502_instruction_set.html#stack
- smaller file sizes
- dark mode
- readable text
- selectable text
Also of interest for me would be whether SVG description markup gets picked up in the index.
To complete the search of possibilities, having the SVG generated by Javascript on page load would be of interest, for example, with some JSON object of data that then gets parsed to plot some SVG images.
Your SVG graphs are very neat and nobody caring is a feature not a bug. If they were blurry PNGs then people might notice but nobody notices 'perfection', just defects.
I noticed you were using 'NASA numbers' in your SVGs. Six decimal places for each point on a path is a level of precision that you can cut down with SVGOMG or using the export features from Inkscape. I like to go for integers when possible in SVG.
The thing with SVG is that the levels of optimisation go on forever. For example, I would set the viewbox coordinates so that (0, 0) is where the graph starts. Nobody would ever notice or care about that, but it would be something I would have to do.
What is the motivation for viewbox coordinates being at (0,0)? I have been thinking about setting chart gutters so that the graph is left aligned with the text, but this seems like an orthogonal issue.
Rather than use MatLab to create your bar charts, you could do something like this.
Here I am assuming you don't want standalone images that others can steal but you do want maximal SVG coolness.
Move the origin with viewBox voodoo witchcraft to 0,0.
Add a stylesheet in your HTML just for your SVG wizardry.
Create some CSS properties scoped to SVG for your colours, for example svg { --claude-code: red; --cursor: orange; --github-copilot: yellow; } and so on.
Put them in the stylesheet, and add some styles, for example claude-code line { stroke: var(--claude-code); } and so on.
Rather than use paths in groups with clip paths and whatnot, just use a series of lines, made nice and fat. Lines have two points, and, since the viewBox is zeroed out to the origin, you only need to specify the y2 value, with y1, x1 and x2 taking the defaults of zero. The y2 value could be whatever suits, the actual value divided by 1000, 10000 or something.
Put each line in a group with the group having a class, for example claude-code.
Add the label to the group with its own transform to rotate the text 45 degrees.
Add a transform to the group to move the fat line and its label along the y axis using a translate.
Rinse and repeat for all entries on the graph.
Now do some labels for the other axis.
As for the title of the graph, move that out of the SVG file. Put the SVG file in a figure element and put the title in a figcaption element. Add CSS for the figcaptions.
With SVG in HTML there is no need to do xlink and version things, just keep it simple, with just the viewBox and no width/height. Scale your figures in CSS with the SVG set to fill the space of the figure, so we are going full width.
You can also use some title elements for mouseovers, so, hover over a bar and you get the actual data number.
Why do it this way?
Say you don't like the colours or you want to implement dark mode. You can do the usual prefers media query stuff and set your colours accordingly, for all the graphs, so they are all consistent.
Same goes with the fonts, you want all that in the stylesheet rather than baked into every SVG, so you can update them all with one master change.
As for the last graph with lots of squares, those squares are 'rect' not path, for maximum readability. The rectangles can be put in a defs container as symbols, so you have veryLightBlueSquare, lightBlueSquare, BlueSquare and so on. Then, with your text you can put each value in a group that contains a text node and a use tag to pull through the relevant colour square.
(For web apps, I feel I can soften a bit, as you’re more likely to be able to rely on styles. But I would still suggest having appropriate width/height attributes, even if you promptly override them by CSS.)
I used to make a lot of charts with R/ggplot and the big disadvantage is, as you mentioned, the sizing of elements, especially text. So I wrote a small function that would output the chart in different sizes and a tiny bit of JS to switch between them at different breakpoints. It worked pretty well I think, the text was legible on all devices, though I still had to check that it looks fine and elements aren't suddenly overlapping or anything.
Another advantage of SVGs is that they can have some interactivity. You can add tooltips, hovers, animation and more. I used ggiraph for that: https://ardata.fr/ggiraph-book/intro.html
It’s way undervalued and rarely gets updates.
https://gionkunz.github.io/chartist-js/
I wrote a small graphing library for mine [1], but it has limitations.
[1] https://coffeespace.org.uk/projects/sound-source-delta.html
In-what? Unhappiness with a statistical outcome? Discouragement with events in one's home state?
Based on the many other uncorrected typos in the example SVG, I suspect that Inkscape has everything but a spell checker.
Apropos, Inkscape is a big app and does practically everything.
[1] https://www.damninteresting.com
A while back I used a giant interactive SVG as the UI for a site I was prototyping, albeit wrapped in a normal HTML page. It was easy to set up and worked reasonably well, but I found that in Firefox performance started to degrade beyond a few thousand elements and so converted everything (except some accessibility features) to use a canvas instead. (The core of the old version is still deployed here if you want to see how far you can push it: https://freeclimbs.org/wall/demo/edit-set )
Strange, I've used SVG a lot and I've not seen that kind of performance problem except when overdoing it with the SVG filters (esp. gaussian blur).
I realize it's far from a best practice and even explicitly stated as a bad idea somewhere in the SVG spec, but the idea of a document editor where you can individually position each and every character and make detailed, individual glyphs natively without loading fonts is interesting to me.
Are there any examples of this? Or perhaps different (better) approaches to a document editor with the advantages I said above?
SVG is a proper part of the browser. You get native text rendering, real links, real text selection, stuff like that.
Flutter is pure-canvas. You get no accessibility (unless you duplicate everything, in which case why even bother?), fake links which don’t behave properly, incorrect text rendering, megabytes of overhead, slow startup, &c.
Though it'd discourage anyone to run off with this idea.. b/c SVGs are unfortunately kinda janky
My top 3 issues are:
- not even overly complicated SVGs, especially with text, will render notably different in different browsers (and renderers like Batik/Inkscape/SalamanderSVG/etc). I have no idea why.. PDFs don't have this issue. While I haven't tried, but I don't think PDFs are as easy to generate programmatically as SVGs
- SVGs have completely broken linking. You can embed an <svg> inside another <svg> to reuse an element - but for some reason it's limited to a link depth of 1! So you can't link an <svg> that links an <svg>. So SVG aren't safely composable - which drives me nuts.. (ex: making a large display panel in SVG that has subcharts)
- Maybe minor.. but tooltips in SVG (which are super handy.. for instance in plots to display additional info about a data point) don't work when the SVG is in an HTML page. They seem to only work when you open SVG in a separate tab.
More abstractly they just have very weird perf issues. Some mildly complex SVGs take GBs of RAM and 1> min to render. But it's unclear which parts are performance sinks.
I've run into this too, but only with SVG filters, not with basic elements like text, although you do have to make sure that the correct fonts are always available.
> tooltips in SVG don't work when the SVG is in an HTML page.
They work just fine when the SVG is actually in the HTML. What you're likely talking about is SVG that is referenced by an <img> tag. The latter means that the browser treats it as an image, so yeah, it doesn't have tooltips. Try putting the SVG directly into the HTML.
> Some mildly complex SVGs take GBs of RAM and 1> min to render.
I have never encountered that in my 10+ years of using SVG.
They do get indexed by Google, and we take some extra steps to ensure usability.
There are some very nice showcases at the bottom of the page. For example, 2021: https://2021.svija.love/
Previously featured on HN: https://news.ycombinator.com/item?id=33518845 [Show HN: All-SVG websites with complex animation]