-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-transforms] [proposal-ish] Non-flattening filters and opacity. #496
Comments
I would also urge that Chrome 53 and all other browsers revert changes (if only this were possible), and wait for the spec to give us proper opacity so that 3D library authors can take advantage of CSS' |
I don't see anything about opacity and flattening at https://drafts.csswg.org/css-transforms/#grouping-property-values anymore. Where'd it go? |
That section is only relevant for 3d transforms, and we split out the 3d transforms to level 2 https://drafts.csswg.org/css-transforms-2/#grouping-property-values |
But also: this discussion has been had to death on the mailing list already. The Before 53, Chrome was just buggy, and automatically pushed opacity down to the leaves when doing 3d scenes. There was no spec change that made them change; they just finally implemented the spec correctly. |
Related spec: https://drafts.csswg.org/css-transforms/#grouping-property-values
The recent changes in Chrome 53 (implementing css-transforms) have caused opacity to flatten 3D objects in my 3D scenes. This is very unwelcoming, and I'd like to propose that the spec needs a better solution.
I'm not proposing the actual solution, but rather ideas that may get you (the experts) to come up with the needed solution.
The full description of the problem and the rough proposed solution is in this message: https://lists.w3.org/Archives/Public/public-fx/2016JulSep/0020.html
Problem
The default new behavior flattens 3D objects, as discussed in the thread titled "[css-transforms] CSS3D breaks with opacity flattening" over in the archives.
It is intuitive that we can apply an opacity to a 3D object using the
opacity
property to make it transparent, but it becoming flat like paper is simply not intuitive.Solution
I propose that we need some way to control what type of opacity we are applying to our objects.
A new
opacity-style
property could allow us to specify the type of opacity we want:opacity-style: 3d
- similar to the legacy behavior and isgreat for 3D scenes, and does not flatten anything. Opacity is multiplied
all the way down the tree with other same-style opacities and stops at
elements that have a different opacity-style (
flat
orsingle
).opacity-style: single
- does not flatten anything and onlyapplies opacity to the target element but not its children
opacity-style: flat
- the new behavior of the latest spec, which Chrome 53just released, where things are flattened and a new 3D context is made. I still
fail to see how this is desirable.
The default value can be
opacity-style: single
, which I think is theleast impacting of the three. We can then see what 3D programmers end up
using more often (I'd like to bet that
opacity-style: flat
will be theleast used). Or, perhaps the default for a 3D object can be
single
, andflat
for non-3D objects.What are your thoughts on something like this,
opacity-style
? Because, asit stands, opacity in the 3D web isn't very workable now in nested scenes
(it is much more workable with the legacy behavior).
The text was updated successfully, but these errors were encountered: