log

April 15, 2008

CSS Gradients

Yay, a future with­out alpha-PNG’s mas­querad­ing as gra­di­ents (or hav­ing to cre­ate an SVG for a sim­ple white fade).

Webkit’s lat­est won­der-fea­ture for design­ers (in addi­tion to the font ren­der­ing I love, rel posi­tioned gen­er­at­ed con­tent, text & box shad­ows, hsla/rgba sup­port and mul­ti­ple back­grounds) is ven­dor-pre­fixed sup­port for CSS Gra­di­ents. I’m encour­aged know­ing that Hyatt is on the CSSWG with a bunch of inter­est­ing specs pro­posed already.

Of course the nor­mal warn­ing for an incom­plete/ven­dor-pre­fixed fea­ture applies: don’t use it in a pro­duc­tion envi­ron­ment since the spec will change dur­ing stan­dard­i­s­a­tion. It’s unfor­tu­nate, but even the well-known CSS3 fea­tures like bor­der-radius (round­ed cor­ners) aren’t nailed down yet.

posted by Andrew

April 10, 2008

CSS snippets

First off, lol.

Nice epi­taph for CSS Eleven, an emp­ty web page that made a lot of buzz but con­tributed zilch to CSS, a stan­dard from the W3C where all is about vol­un­teer work, in more than six months.

Example of CSS Compound Transform

Sec­ond­ly, it’s worth men­tion­ing this arti­cle on CSS3.info. Read the vari­ables spec at least — it’s short (so far), sim­ple and solves a long­stand­ing prob­lem. Apple’s three specs are more involved. It’s the trans­forms I’m most excit­ed by; Ani­ma­tions and Tran­si­tions are declar­a­tive sub­sets of JS DOM manip­u­la­tion, and like Peter Gasston I have reser­va­tions. In my mind it comes down to whether the 80/20 rule is being served (cov­er­ing sig­nif­i­cant use-cas­es) and whether keyframe data con­sti­tutes pol­lut­ing style sheets. I def­i­nite­ly feel that keyframe data does­n’t belong in CSS.

I like to be prac­ti­cal how­ev­er, and in this sit­u­a­tion CSS is a con­ve­nient, exten­si­ble deliv­ery mech­a­nism with estab­lished pars­ing and fall­back rules wide­ly imple­ment­ed. Of course this means the spec has a greater chance of imple­men­ta­tion than a com­plete­ly new pro­pos­al for Cas­cad­ing Ani­ma­tion Sheets with new pars­ing rules. We have to weigh the val­ue of CSS puri­ty vs hav­ing a work­able alter­na­tive to the “tra­di­tion­al” ani­ma­tion options such as Flash. JS ani­ma­tion is a niche, does­n’t fit to the devel­op­er audi­ence and the tools just aren’t there. Anoth­er five year wait for a sim­ple ani­ma­tion sys­tem could pret­ty much kill any chance of adop­tion later.

On the oth­er hand, I don’t think any­one involved in the ini­tial SVG spec imag­ined it’d ever include raw sockets.

posted by Andrew