Hacker News new | ask | show | jobs
by T-hawk 4883 days ago
Great info. The missing part is educating web developers that this is even possible. The thought that SVG can accept CSS styles never occurred to me until this thread and your answer. And I can hardly be the only such ill-informed web developer in the world.

So we do have a good technical solution for what this submission is doing with the web font, as the top post asks. SVG with CSS would be a more proper way of expressing a styleable vectorized map of states. (But the web font is still an exceedingly clever hack, and grabs attention in a way that a boring old SVG tutorial wouldn't.)

1 comments

Yes. For an example, compare the underlying XML of http://globestroller.com/maps/US_48.svg with the original at http://upload.wikimedia.org/wikipedia/commons/e/e9/Blank_US_...

In the original the states already had IDs (except, for some reason, Virginia), so it was simply a matter of moving the inline styling to a CSS section at the top.

The CSS can also be in a different file, which could be dynamically generated for different users if you wanted to build a simple "make a pretty map of which states you've visisted" app.