Re: [cssom] CSS Value API

On Thu, Apr 22, 2010 at 11:23 AM, Estelle Weyl <estelle@weyl.org> wrote:
> Do we have an option for different  syntax / units?
>
> for example:
>
> .color.rgb returning rgb() instead of hex // rgb(255, 0, 0)  instead of
> #FF0000
> .color.rgba
> .color.hsla
> .color.colorName
> rads, versus grads versus degrees?
> Hz / kHz
>
> etc

Put simply, yes.  We talk about lengths a lot, and refer to
accessing/setting a property using .width.px, .width.em, etc.  But the
same principle applies more globablly.  Colors can be set with, frex,
color.r=127, etc.

(This brings up an interesting point.  Are we sure that (1) colors are
the only things that will be using single-letter accessors and (2)
that no color types we define will ever have overlapping accessor
names?  hsl has an overlapping "l" name with the proposed list
accessor, and cmyk() (introduced in GCPM, iirc) has an overlapping "m"
name with the proposed map accessor.  So far none of the colors
overlap with eachother, if you consider rgb() and hsl() just shortcuts
for rgba() and hsla().

~TJ

Received on Thursday, 22 April 2010 18:31:38 UTC