-
Notifications
You must be signed in to change notification settings - Fork 715
[css-color] opacity and stacking context? #2093
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
Comments
The current draft has the following text about the
Also, it states that the opacity is applied to the element as a whole, including nested elements, so it's impossible to "undo" opacity for children by setting them greater
Doesn't this answer to your second concern (about children's opacity)? |
Not sure what makes you think that browsers don't create a stacking context when |
The parent opacity: 0.5, z-index:auto Rendered: but without stacking context. the opacity is animated linear and there will be flickering at end of animation? It is bad solution. The opacity shall NOT CREATE stacking context. Please try it in IE. FF and Cr. The behaviour is different. |
Based on the current spec, this looks like a bug in Microsoft browsers. It was even submitted to Microsoft back in 2013 (and closed as Won't Fix because of "the limited impact this bug may have" for IE10), but somehow this bug persists even in Edge 16. |
Per the current spec, there would be flickering when the opacity changes from |
Closing as WONTFIX because this relates to a bug in a browser which is no longer being developed (IE) and another which has switched browser engine so no longer has the bug (Edge). |
https://drafts.csswg.org/css-color/#icc-colors
There shall be no additional stacking context for the opacity. It works good and is used in many of sites with absolute, relative and fixed positioning for children. For example a menu with a "button" to show with animations to show it always on top.
There shall be only cleared that the children cannot have greater opacity than parent (IE issue) and that opacity:0 is not equivalent of visibility:hidden;
If I want stacking context I set position relative and z-index to 0.
Why new Editors Draft is not compatible with current behaviour of browsers and former specification?
The text was updated successfully, but these errors were encountered: