You are exactly right, thank you! I have removed the transform and replaced it with a `left: -50%; top: -50%` approach for centering. Then I added a sufficient z-index, and it worked!
Stacking contexts are valuable knowledge. Shame it screws up on transform, but there are workarounds. On 28 December 2016 at 14:44, Bernardo <[email protected]> wrote: > It works if you remove the transform from the .behind class. Adding the > transform creates a stacking context[0] and then the z-index doesn't work > between hierarchies (or components in your case). There are some posts > about the stacking context in stackoverflow. > [0] https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_ > Positioning/Understanding_z_index/The_stacking_context > > On Tuesday, 27 December 2016 21:45:04 UTC-3, Sandi Dušić wrote: >> >> Hi! >> >> I've asked about this on Stack Overflow, but the answers I was given were >> inapplicable. Here's the post >> <https://stackoverflow.com/questions/41309311/css-transparency-issue-with-background-text> >> describing my problem, along with example code. >> >> The solution suggested was to reorder a DOM element or put it at a >> different depth. The thing is, I cannot just move tags around at will, >> because this is Elm, not a static HTML document. The div having >> transparency issues is part of the view of a deeply nested component. In >> order to have it drawn higher up, that component would have to pass >> messages a few levels up the component tree, increasing the boilerplate >> amount substantially. It doesn't make much conceptual sense either, since >> each component should care about it's own view. >> >> Is there a workaround of some sort? >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Elm Discuss" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/elm-discuss/Hp6jXJ8NGVw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
