News for hackers. Stuff that matters.
Re:Finally, CSS based gradient text, no images by robin_reala on Monday May 18, 2009 @06:15PM (#615804)
Well, that’s horrible for accessibility.

Contrary to popular opinion, assisstive technology for the visually disabled piggybacks onto existing browsers and so gains the full benefits of Javascript. If you’re going to clone your text 52 times over, then your text will be read out 52 times by the browser. Oops.

Re:Finally, CSS based gradient text, no images by IsaacSchlueter on Monday May 18, 2009 @07:20PM (#615897)
Also contrary to popular opinion, an img tag with an appropriate alt attribute is very accessible (in any browser but IE, it's even resizable.)
Re:Finally, CSS based gradient text, no images by JoelSutherland on Monday May 18, 2009 @06:18PM (#615806)
This works by duplicating the text, one copy for each pixel of height. The text is then clipped with overflow: hidden. The sluggishness on that page results from a couple hundred (thousand?) copies of the text positioned absolutely and needing to be clipped.

The description is here: http://labs.dragoninteractive.com/rainbows_article.php

Re:Finally, CSS based gradient text, no images by RossM on Monday May 18, 2009 @05:32PM (#615742)
Interesting technique, but it does use JavaScript (but degrades nicely).

A couple of side-effects: Firefox 3.0.8 is pretty sluggish when scrolling (although it might be better with only one instance of this used), also you can't (visibly) select the text that has this applied to it.

Re:Finally, CSS based gradient text, no images by davidbnewquist on Monday May 18, 2009 @06:12PM (#615798)
Looks good, but I also experienced unbearable sluggishness on Linux/Firefox when scrolling.

Specifically, Xorg and firefox processes use nearly all my CPU when I scroll.

It's unusable in its current form (at least on this system). Hopefully you can tune your code; this is a neat effect.

Re:Finally, CSS based gradient text, no images by rythie on Monday May 18, 2009 @07:00PM (#615861)
Unusable for me on Linux/firefox too.
Re:Finally, CSS based gradient text, no images by silentbicycle on Tuesday May 19, 2009 @09:04AM (#616680)
There seems to be something really slow about javascript-heavy sites on Unix, I think.

I'm really curious what the underlying cause is, if it's not just perception bias on my part.

Re:Finally, CSS based gradient text, no images by rythie on Tuesday May 19, 2009 @09:53AM (#616776)
Possibly, since I don't use anything else I don't know (except in a virtual machine). I get the impression however that the firefox people spend a lot of time optimizing for MacOS and Windows that they don't spend on Linux for some reason.
Re:Finally, CSS based gradient text, no images by cvboss2 on Monday May 18, 2009 @09:07PM (#616030)
same for IE6
Re:Finally, CSS based gradient text, no images by nostrademons on Tuesday May 19, 2009 @02:38AM (#616377)
Performance is not a problem in Chrome, but readability is. It's virtually unreadable because of fuzzy text rendering.
Re:Finally, CSS based gradient text, no images by saturdayplace on Monday May 18, 2009 @06:24PM (#615818)
Finally? Forgive me, but I can't really see the need for CSS to pull this off on its own. With gradient text you're not looking to convey information (or at least, no more than the words would convey with any other css-available text effect), you're looking for a visual effect. Something that images handle rather well.
Re:Finally, CSS based gradient text, no images by potatolicious on Tuesday May 19, 2009 @04:44AM (#616468)
Or if you're looking for something that scales nicely with screen resolution or whatnot, SVGs. I'm really looking forward to vector graphics getting better support in browsers - half the time we used bitmap images we really mean something else.
Re:Finally, CSS based gradient text, no images by ssharp on Monday May 18, 2009 @07:28PM (#615909)
Yes, that "finally" was very questionable.
Re:Finally, CSS based gradient text, no images by Sephr on Monday May 18, 2009 @07:15PM (#615889)
This uses JavaScript, not CSS.

CSS on the other hand, does have a built-in way to do gradients (CSS3+):

    *-colors: #color1 #color2 #color3 #color4 ect
For example, this demo makes use of border-colors gradients and border-radius: http://code.eligrey.com/css3/border-colors/styled.html (Only shows gradient in browsers that support CSS3 like FF3 & Safari 3)
Re:Finally, CSS based gradient text, no images by robin_reala on Tuesday May 19, 2009 @10:03AM (#616801)
While that’s really neat (and something I didn’t know about) it’s not something that makes an appearance in either the CSS3 Colors or Backgrounds & Borders specs. Call it a vendor specific CSS extension rather than CSS3 for the time being.
Re:Finally, CSS based gradient text, no images by noodle on Monday May 18, 2009 @05:24PM (#615728)
i think you mean a css and javascript/jquery based gradient text.

doesn't seem to work too well with dark backgrounds, either. at least, in chrome.

Re:Finally, CSS based gradient text, no images by ghempton on Monday May 18, 2009 @07:05PM (#615871)
It is barely readable in chrome. Everything is extremely aliased and there are some artifacts.
Re:Finally, CSS based gradient text, no images by chaosmachine on Monday May 18, 2009 @07:08PM (#615878)
The output looks really nice, but the implementation is not so great. Turn it into a service that outputs these in png format on the fly.
Re:Finally, CSS based gradient text, no images by Batsu on Monday May 18, 2009 @11:10PM (#616166)
I can appreciate the desire to have simple, CSS based solutions for somewhat common requests -- though I would not consider gradient text a common request, just work with me here -- solving the issue by coming up with some elaborate solution that is generally reserved for crazy positioning problems to work with IE5+ and modern browsers simultaneously is hardly a good approach.

That was a long sentence.

Re:Finally, CSS based gradient text, no images by ndunn2 on Tuesday May 19, 2009 @01:11AM (#616298)
Am I the only one who couldn't even select the resulting text? No good
Re:Finally, CSS based gradient text, no images by wlievens on Tuesday May 19, 2009 @03:39AM (#616422)
It scrolls terribly in my experience. They probably littered the dom with overlapping translucent divs or something.
Re:Finally, CSS based gradient text, no images by eli_s on Monday May 18, 2009 @08:09PM (#615971)
what a terrible solution to a non-existent problem. This doesn't even work as a proof of concept - I can't think of a single scenario where this technique would be useful.

Talk about killing a fly with a sledgehammer!

Re:Finally, CSS based gradient text, no images by erlanger on Tuesday May 19, 2009 @12:04AM (#616222)
Holy crap, did you see the markup? At that rate, you could have CSS-based bitmaps.