Re: [svgwg] Opacity properties should affect nothing but opacity

This is an example (linked from 
https://philipwalton.com/articles/what-no-one-told-you-about-z-index/ 
) where changing opacity for one item (an item without any children 
elements / not a group) changes stacking order:

http://codepen.io/philipwalton/pen/dfCtb

In that example there's z-index (as SVG might soon have), and there's 
"opacity: .99" for the red item. I can set "opacity: 0.5" and the red 
item becomes more faint, and stays behind the two other items. When I 
set "opacity: 1.0", that red item moves to the foreground - it 
suddenly overlaps the other items.

That probably will confuse SVG users who do use z-index. Is it not 
possible (in the spec) to ensure that when someone uses z-index and 
changes only the opacity value, the stacking order stays the same? In 
that example (linked above) the red item should always stay where it 
is / changing opacity should not change the stacking order. I don't 
see, in such cases where no group-opacity is involved, it would be 
impossible to ensure that changing opacity is completely side-effect 
free. Document order and z-index would affect nothing but stacking 
order (overlaps), and opacity would affect nothing but opacity (except
 when there's group-opacity as Tab had explained).

-- 
GitHub Notification of comment by tobireif
Please view or discuss this issue at 
https://github.com/w3c/svgwg/issues/264#issuecomment-246979567 using 
your GitHub account

Received on Wednesday, 14 September 2016 11:08:02 UTC