log

April 15, 2008

CSS Gradients

Yay, a future without alpha-PNG’s masquerading as gradients (or having to create an SVG for a simple white fade).

Webkit’s latest wonder-feature for designers (in addition to the font rendering I love, rel positioned generated content, text & box shadows, hsla/rgba support and multiple backgrounds) is vendor-prefixed support for CSS Gradients. I’m encouraged knowing that Hyatt is on the CSSWG with a bunch of interesting specs proposed already.

Of course the normal warning for an incomplete/vendor-prefixed feature applies: don’t use it in a production environment since the spec will change during standardisation. It’s unfortunate, but even the well-known CSS3 features like border-radius (rounded corners) aren’t nailed down yet.

posted by Andrew

April 10, 2008

CSS snippets

First off, lol.

Nice epitaph for CSS Eleven, an empty web page that made a lot of buzz but contributed zilch to CSS, a standard from the W3C where all is about volunteer work, in more than six months.

Example of CSS Compound Transform

Secondly, it’s worth mentioning this article on CSS3.info. Read the variables spec at least — it’s short (so far), simple and solves a longstanding problem. Apple’s three specs are more involved. It’s the transforms I’m most excited by; Animations and Transitions are declarative subsets of JS DOM manipulation, and like Peter Gasston I have reservations. In my mind it comes down to whether the 80/20 rule is being served (covering significant use-cases) and whether keyframe data constitutes polluting style sheets. I definitely feel that keyframe data doesn’t belong in CSS.

I like to be practical however, and in this situation CSS is a convenient, extensible delivery mechanism with established parsing and fallback rules widely implemented. Of course this means the spec has a greater chance of implementation than a completely new proposal for Cascading Animation Sheets with new parsing rules. We have to weigh the value of CSS purity vs having a workable alternative to the “traditional” animation options such as Flash. JS animation is a niche, doesn’t fit to the developer audience and the tools just aren’t there. Another five year wait for a simple animation system could pretty much kill any chance of adoption later.

On the other hand, I don’t think anyone involved in the initial SVG spec imagined it’d ever include raw sockets.

posted by Andrew