Live data from Hacker News

This is a web page

justinjackson.ca

441–445 of 445 posts

Re: This is a web page

#441

Earlier quoted context omitted.

it looks as if the colour is just a background-color attribute in CSS, which changes on mouseover. If so, it should be white->transparent anti-aliased in the RK image, which is looks like it's trying to be. Vector, e.g. drawn with Canvas, would be better (e.g. with a fallback to a single colour png.)

Why would you draw the vector manually with canvas when the browser can do it (SVG)?

I suggested canvas because that's how I've generated programmatic images from my own "vector" formats (scientific datafiles,) and rendered them at arbitrary zoom.

Generating the relevant shapes and lines for a simple logo would be easy this way, although probably would require a larger download vs. a vector image, since the canvas method would need to load extra javascript to duplicate the SVG support built in to the browser.

I'm not saying it is necessarily a better idea, just that I've had more success with canvas drawing methods than trying to actually make a vector image.

Re: This is a web page

#443

Earlier quoted context omitted.

Why would you draw the vector manually with canvas when the browser can do it (SVG)?

I suggested canvas because that's how I've generated programmatic images from my own "vector" formats (scientific datafiles,) and rendered them at arbitrary zoom. Generating the relevant shapes and lines for a simple logo would be easy this way, although probably would require a larger download vs. a vector image, since the canvas method would need to load extra javascript to duplicate the SVG support built in to the…

Making a vector image is piece of cake. The SVG syntax is a bit concise, but that's about it. See http://blogs.sitepointstatic.com/examples/tech/svg-curves/cu... . Regarding arbitrary zoom, it's just a matter of changing the viewbox: http://www.justinmccandless.com/blog/Making+Sense+of+SVG+vie... (it's no madness though) And you don't even have to redraw (that's the benefit of SVG, it has a scene graph unlike canvas). Remember, a vector image doesn't need to have any inherit width or height! In fact, if you don't specify it, the browser will resize the image so that the viewbox fills the browser viewport!

Another advantage is that you can handle generated images as images, not as code, without converting them to raster bitmaps (which I guess you'd be forced to when when dumping the canvas).

Re: This is a web page

#444

Earlier quoted context omitted.

That's quite beautiful for such a small stylesheet. I once almost started a web site called SimpleStyleSheets that had that goal -- maximum of 4 lines of CSS, no ugly compression, maximum of 120 characters per line. And see how good you can make a page of simple semantic content look. I should do it now -- it'd be a good exercise in this day of complex designs and bloated styles.

It could even be a little smaller if the max-width and margin were placed on the body tag. You don't even need the wrapper!

This wouldn't work with background colors though, would it? I imagine the document background color would be undefined outside the body then. Do you suggest putting the background color on the html element? I never saw that.

Re: This is a web page

#445
post #308

Earlier quoted context omitted.

> I have much more frequently seen video whose author had deluded himself into thinking it was beautiful. I have some sympathy for your point, but I don't think the argument about video is valid. 99% of the web is crap. Always has been. Probably always will be. The crap includes text, video, etc., etc. That's why we have search engines and sites like HN -- to help us find the 1%. The existence of the other crappy 99%…

Point — but you're even less optimistic than Gresham!

I meant Sturgeon.
Post reply on HN