Re: [css3-ui] Comments on css3-ui 'pointer-events'

Hi Erik,

(please direct follow-ups and any other new CSS issues to www-style)

On Tue, Sep 28, 2010 at 12:24 AM, Erik Dahlstrom <ed@opera.com> wrote:
> On Tue, 28 Sep 2010 03:06:57 +0200, Tantek Çelik <tantek@cs.stanford.edu>
> wrote:
>
>> On Mon, Sep 27, 2010 at 5:51 PM, fantasai <fantasai.lists@inkedblade.net>
>> wrote:
>>>
>>> On 09/27/2010 02:02 PM, Erik Dahlstrom wrote:
>>>>
>>>> doug: i don't think it belongs in the SVG Integration spec. it
>>>> belongs somewhere else
>>>> ... i'm interested in speccing this out
>>>>
>>>> <scribe> ACTION: doug to draw up a pointer-events spec [recorded in
>>>> [22]http://www.w3.org/2010/09/27-fx-minutes.html#action04]
>>>
>>> Tantek was already actioned to work on this spec, using existing
>>> work by WebKit and Opera. Perhaps you should talk to him first.
>>
>> As agreed at the August Oslo CSS WG f2f, I wrote up pointer-events,
>> looking at the specs from Mozilla, Apple, and Opera, and have
>> integrated it into an editor's draft of CSS3-UI since we already have
>> interop.
>>
>> http://dev.w3.org/csswg/css3-ui/#pointer-events
>>
>> Tantek
>
> Good to see that the proposal has been moved into a specification.
>
> Here are some comments on the CSS3 ui spec (for pointer-events in
> particular):

Thanks *very much* for taking the time to review and provide such
thorough constructive feedback on 'pointer-events'.

A few follow-up requests for clarification below.


> * If the computed value of 'pointer-events' is the specified value, and the
> initial value has been changed to be 'auto' then you cannot conform to both
> the SVG spec (where the intial value is 'visiblePainted') and css3 ui.
>
> Example:
> <svg xmlns="http://www.w3.org/2000/svg">
>  <script>alert(window.getComputedStyle(document.documentElement,
> null).getPropertyValue("pointer-events"))</script>
> </svg>
>
> It's possible that there's no way around this, but it should be explicitly
> stated in the spec in that case. A quick test shows that IE9 and Opera
> return 'visiblePainted', while webkit and firefox return 'auto'.

When there's been conflicts like this in the past with other
properties, we've addressed them by additions to the UA style sheet
for SVG to explicitly set an SVG-specific initial value.  There is no
effectively no effect on existing SVG functionality or
implementations.


> * In SVG 1.1 the 'pointer-events' property only applies to 'graphics
> elements', but in css3-ui it applies to all elements. Why? I don't think it
> makes any sense to have it apply to svg's container elements for example.

Any element can be given dimensions with CSS and thus can potentially
receive events.


> * If the property is to be defined in the css3-ui specification, then it
> would be nice with links back to the SVG 1.1 specification for the 'fill'
> and 'stroke' property definitions.

Could you provide URLs for those links?


> * The definition of 'all' (and other pointer-event values) is unclear for
> SVG content in particular.
> [[ The element may be the target element for pointer events whenever the
> pointer is over the contents, background, or border of the element (or in
> SVG, over either the interior (i.e., fill) or the perimeter (i.e., stroke)
> of the element). Outlines, shadows, and reflections are excluded. The value
> of the ‘visibility’ property does not effect event processing. ]]
>
> You can make outlines, shadows and reflections in many different ways in
> svg,

The context is *CSS* outlines, shadows and reflections. I'll add "CSS"
to clarify that.


> Also the note about how 'fill' and 'stroke' don't
> affect the result for 'all' is missing (compare with the SVG 1.1
> pointer-events definition[1]). Maybe it would be better to state how 'all'
> is applied in svg separately from how it's applied otherwise. The same also
> applies to all the other pointer-event values, where svg is mentioned in
> parenthesis.
> [1] http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty

Ok.


> * The pointer-events definition in css3 ui[2] lacks many of the details from
> the SVG 1.1 specification[1], e.g how 'clip-path' and 'mask' affects
> pointer-events, how text elements are handled etc. Is this intentional?
> Please consider simply linking to the svg specification for all the "SVG
> only" definitions instead of repeating them here - unless they are given
> some special new meaning in css3 ui.
> > [2] http://dev.w3.org/csswg/css3-ui/#pointer-events

I will incorporate them as necessary, as part of the goal here is not
to not normatively depend on SVG 1.1 for the property definition
itself.  This is similar to how CSS3 color incorporates and defines
the full set of color keywords instead of normatively depending on
SVG.

http://www.w3.org/TR/2010/PR-css3-color-20101028/#svg-color


> * How opacity (and other forms of alpha, e.g rgba, fill-opacity,
> stroke-opacity etc) affects 'pointer-events' is undefined.
>
> * How 'clip-path', 'mask' and 'filter' affect 'pointer-events' is undefined.

Noted as open issues [tc1].

[tc1] http://wiki.csswg.org/spec/css3-ui

Feel free to add more issues to that wiki page.

Thanks again for reviewing this editor's draft - I appreciate the
early comments on a work in progress.

Tantek

-- 
http://tantek.com/ - I made an HTML5 tutorial! http://tantek.com/html5

Received on Wednesday, 17 November 2010 22:56:09 UTC