Order and initial value of paint-order property

Hi,

I was looking into implementing the paint-order property in WebKit today and have some questions and change requests[1]:


1) Why normal keyword?

Why is there a normal keyword? Why not make the initial value: fill stroke marker? I know that there are no markers for some elements. It shouldn’t be a problem to specify that in this case no markers are drawn.

I could see that this is problematic if we add another layer later. I am not sure if ‘auto' might make more sense as replacement for ’normal’.


2) Should we change the painting order by given keywords?

The behavior for ‘normal’ on a path element is like: fill stroke marker,

This is counter productive in a way that the order is the opposite to how ‘background', ‘fill' and ‘stroke’ operate on layers. Following these properties would be marker stroke fill. The last specified value gets drawn first.


3) Allow to not draw a layer

The spec says that an omitted keyword is drawn last (and then in order as if ’normal’ was specified). This doesn’t allow to omit a layer on purpose. I would suggest that the layer that wasn’t specified doesn’t get drawn. This allows specifying stroke, fill and marker and control what gets drawn just with paint-order.

Greetings,
Dirk

[1] https://svgwg.org/svg2-draft/single-page.html#painting-PaintOrder

Received on Thursday, 13 February 2014 12:09:58 UTC