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

Re: [cssom] Directions for better OM expansions

From: Maciej Stachowiak <mjs@apple.com>
Date: Fri, 17 Sep 2010 11:44:13 -0700
Cc: Anne van Kesteren <annevk@opera.com>, www-style list <www-style@w3.org>
Message-id: <3B297899-A3A8-442A-8622-B00E1234A117@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On Sep 14, 2010, at 10:46 AM, Tab Atkins Jr. wrote:

> On Tue, Sep 14, 2010 at 12:32 AM, Anne van Kesteren <annevk@opera.com> wrote:
> 
> 
>>> So, I've boiled down the use-cases I think are useful to address (not
>>> included in this email for brevity, but can be provided upon request)
>> 
>> Please do email these.
> 
> All right, here they are, expressed in terms of user stories:

A susprising number of these all come from "I'm writing a CSS editing tool". Out of the features you listed, are there any justified only by that use case? I'm curious if the design would be different without considering editors. A good editor may have really crazy needs, like the ability to round-trip comments and exact formatting (including whitespace).

> 
> 1. I'm writing a CSS editting tool, and I want to present to the user
> all the rules that apply to a particular element, and where they come
> from, ordered by specificity.
> 
> 2. I'm writing a CSS editting tool, and I want to let the user edit
> arbitrary CSS that may come from @style attributes or author
> stylesheets.
> 
> 3. I'm writing a CSS editting tool, and I want to present the "actual
> values" of all properties to the user, so they can see exactly what's
> happening at that exact moment even if they don't understand the
> cascade process.
> 
> 4. I'm writing a CSS editting tool, and I want to present a "metrics"
> display visually illustrating all the box-model dimensions (width,
> height, padding, border, margin) in both their specified value and
> what that translates to in absolute dimensions (that is, px).
> 
> 5. I'm a page author, and I want to read/write the value of a property
> in the @style attribute of a page.
> 
> 6. I'm a page author, and I want to read/write the value of a property
> in the style-sheet block that's providing the value (or just the first
> one that *would* provide the value, if it wasn't being overridden by
> @style or something) so that the change will propagate to all similar
> elements.  (Possibly this requires a bit more smarts from the author,
> like examining selectors?)

Is there a real scenario where page authors would use this? I am mildly skeptical, based on the vague story. In fact, most of these page author use cases are pretty vague. It would help to get more concrete, for instance "I want to animate the size and bounds of a lightbox when it initially appears" or "I want to pop up a menu that fades in." A lot of these use cases just sound like the feature list with "I'm a page author" prepended.

> 
> 7. I'm a page author, and I want to set a style to a specific value
> without worrying about whether I'm killing something that was
> specified in a stylesheet or a @style rule (often occurs when you're
> wanting to hide something - you want to display:none it, but then
> restore it to whatever display value it had previously, which may have
> been set in @style).
> 
> 8. I'm a page author, and I want to see what the value of a property
> is, regardless of what its source is.
> 
> 9. I'm a page author, and I want to see what the value of a property
> is in a particular unit, regardless of what unit it's provided in.
> 
> 10. I'm a page author, and I want to see what the value of a property
> is while an animation is running and affecting the value.
> 
> 11. I'm a page author, and I want to see the values of various
> properties while the element is affected by a transform (that is,
> width should be 2x while a scale(2) is in effect).
> 
> Again, I'm taking for granted that a Values API will exist to make
> reading and manipulating all these values easy, so I didn't mention
> that in anything here.
> 
> ~TJ
> 
Received on Friday, 17 September 2010 18:44:48 GMT

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