- From: Joseph Orbegoso Pea via GitHub <sysbot+gh@w3.org>
- Date: Fri, 23 Sep 2016 22:55:15 +0000
- To: public-svg-issues@w3.org
Also, the solution isn't to simply apply opacity to the leaf nodes,
because in reality non-leaf nodes are also rendered.
f.e. the following is a hypothetical 3D scene where each item is
placed and rotated (using `matrix3d`) relative to it's parent (for
convenience, rather than calculating world transforms manually from a
virtual tree):
```js
<style>
...
div {
transform-style: preserve-3d;
}
...
</style>
...
<div style="transform: matrix3d(...)">
this is rendered content
<div style="transform: matrix3d(...)">
this is rendered content
<div style="transform: matrix3d(...)">
this is rendered content
</div>
</div>
</div>
...
```
You, and people in the public-fx thread, propose that in order to make
everything transparent we should apply opacity to the elements
directly.
1. That is impossible in the above example without changing the
markup, otherwise the whole object will be flattened as soon as the
parent-most div has opacity applied to it.
2. The opacities will be inherited and multiplied anyways according to
new spec.
3. Someone who has _no access to the HTML and can only modify the CSS_
is out of luck, because this requires a markup change.
4. After making the markup change (using the non-nested approach for
CSS3D), the opacities will no longer be multiplied which will require
JavaScript in order to do the multiplication.
5. Changing the markup changes the structural meaning that is being
conveyed, and possibly changes the semantical meaning of the content
as far as spiders and crawlers are concerned.
6. Library authors like me, who depend on (and prefer) the nested
approach of defining 3D scenes using `preserve-3d`, and who are
defining custom elements that can contain content just like the
`rendered content` in the above examples, will now have to render to a
separate root element where all the 3D objects are non-nested, all
transforms are multiplied manually rather than the HTML/CSS engine,
and all opacities are multiplied manually rather than the HTML/CSS
engine.
7. Users of libraries made by those authors will not be able to place
content into the custom elements in a reliable way. It destroys CSS
selection because either the original content remains behind in the
custom elements and content is cloned into the new non-nested scene,
or the content is moved by the library and placed into the new
non-nested scene, and either way is bad.
This is not good.
--
GitHub Notification of comment by trusktr
Please view or discuss this issue at
https://github.com/w3c/svgwg/issues/264#issuecomment-249320948 using
your GitHub account
Received on Friday, 23 September 2016 22:55:22 UTC