Posts from Monday, May 12th, 2003

Blending Galore

Published 14 years, 9 months ago

For some reason I decided this weekend to crawl into a hole and hack some JavaScript, so the Color Blender‘s gotten an upgrade.  You can use a “waterfall” display of “web-safe” colors to input colors, or type them in as before.  If you have already filled in colors and switch value formats, the colors will stay and the values will be converted in place.  This can be useful if you want to, for example, find midpoints between #AA31FF and rgb(13%,23%,42%).  I think the changes make the tool even more useful, and I hope you do too.

Oh, and yeah, I used a simple table to lay out the page.  I toyed with positioning and floating the three “columns,” but in the end the table approach seemed the easiest, so I went with it.  This was partly because I have a footer and didn’t want to mess with floating and clearing just to get it below everything else.  It was also because, after a day or two of grappling with JavaScript, I got lazy.  I may go back at some point and replace the table with floats.  In the meantime, this works well enough.

CSS2 and the official CSS1 Test Suite both turn five years old today.  I’m not sure if I bring this up in celebration or protest, but in my case, it’s definitely cause for introspection.

A couple of contributed designs have sprouted in the CSS Zen Garden, and I imagine there will be more to follow.  What an incredible resource!  A few weeks back, I said in my close-up* interview:

While an artist is certainly limited by his medium, it’s more often the case that the medium is limited by its artists. Until a Picasso or Serat comes along, you don’t truly appreciate what the medium can produce. As more designers come to use CSS, we’ll see more compelling CSS-driven sites.

Dave Shea and his contributors are doing exactly that:  showing us more of what the medium can do, and creating a compelling site.  Just moving from design to design in the Zen Garden should be ample proof that CSS is capable of more than most of us have ever thought possible—me included.

Meanwhile, David Hyatt posted to say that XBL directly addresses the point I made in Thursday’s post:

You attach XBL to an element through CSS, and XBL can generate a complete anonymous content subtree that can then be styled using a scoped stylesheet applied to those elements. You can even scatter the real content however you’d like within the anonymous content tree…. XBL is a perfect tool for implementing complex layouts at the presentational level and preserving the purity of the main source document. XBL can even execute scripts for fancy animation effects or rollovers, all without the source document being polluted at all.

Sign me up!  I had no idea XBL was capable of this sort of thing; when the “XSLT vs. XBL” thread erupted on www-style a few months ago, I pretty much tuned it out after the fifth message.  Obviously I should have paid a little more attention.  If I can, for example, take a paragraph and use XBL to generate three block boxes and two inline boxes, styling each one independently to create given effects and applying multiple backgrounds, then it seems like the ideal solution.  Except for that whole lack of cross-browser support thing, of course.  Still, a similar lack didn’t exactly stop me from digging into CSS, back in mid-1996.