How to apply CSS Contain without messing with shadows

For every section tag I applied in CSS the contain property in order to improve performance, the problem is shadows that are overlapping its section are trimmed:

Is there any way to fix this without removing the shadows while taking advantage of the perf boost from this property?

Please post your actual code. Thanks

Sure give me a sec and I create a Codepen

Here it is:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.