W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: Thoughts on CSS 3 Images, CSS 3 Transforms and CSS OM

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 3 Sep 2010 12:42:59 -0700
Message-ID: <AANLkTine6HCM11kXiVaszauv3hcUS=WgdhCqxB2WQK+o@mail.gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Fri, Sep 3, 2010 at 12:12 PM, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
> I am currently implementing CSS 3 multiple backgrounds with linear
> and radial gradients and CSS 3 Transforms into my new Web editor,
> BlueGriffon [1] [2].
>
> Having those features implemented in a wysiwyg editor, supposed
> to hide entirely the complexity of CSS and provide the user with
> clean and intuitive UI, is hell for the following reasons:
>
> 1. the complexity of linear-gradient() and radial-gradient() functional
>   notations.
>
>   Given the complexity of those notations, I had to rely on my
>   CSS parser JSCSSP to parse them. In other terms, I had to reimplement
>   in JavaScript the whole machinery of the CSS parser because no API
>   is exposed to reach the internals of a given gradient. Urgh, to say
>   the least.
>
>   Web or app authors should not have to write a parser, even based on
>   RegExps, to manipulate a given CSS value since the rendering engine
>   already has everything needed for that, just not exposed.
>
>   I then strongly recommend the inclusion in the CSS 3 Images spec of
>   a DOM API allowing to reach the individual components of a given
>   gradient (angle, position, size and shape for radial gradients,
>   array of color stops). I have no religion about where in the DOM
>   it should be added and I care only about the feature itself.

I strongly agree.  I'm waiting to see what Anne wants to do with
functions in the CSSOM Values API before I write something.

It could be that all I need to do is write an interface for gradients,
and it could work automagically (well, "work" in the sense of being
something that can possibly be implemented).  Is this true, Anne?

~TJ
Received on Friday, 3 September 2010 19:43:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT