isolation in css: can't the gradient shadow be achieved just by z-index: -1?

in kevin's video abt isolation https://www.youtube.com/watch?v=sNYVqfRwX1A&t=63s&ab_channel=KevinPowell timestamp at around 03:11 can't the gradient shadow be achieved just by z-index: -1?
Kevin Powell
YouTube
5 useful CSS properties that get no love
I have a new course coming soon! https://beyondcss.dev šŸ”— Links āœ… More CSS tips & tricks: https://youtube.com/playlist?list=PL4-IK0AVhVjMug_P141R10p6pHgg3kxaa āœ… Relative & Absolute positioning: https://youtu.be/P6UgYq3J3Qs āœ… The content property in-depth: https://youtu.be/xoRbkm8XgfQ āœ… More on accent-color: https://youtu.be/MRahw3qnRBQ āŒš Times...
2 Replies
Kevin Powell
Kevin Powellā€¢16mo ago
yup yup! but if the parent element (say, the section) has a background-color on it, then the gradient-shadow will go behind that background-color.
redtypoOooOo
redtypoOooOoā€¢16mo ago
aw yes, in such situation, isolation would be of good help! I was curious if I have missed anything abt z-index n isolation since I am quite new to coding. šŸ™‚ and hi Kevin! nice to hear from you, thank you for all the great videos and insight. I have been doing your responsive website series and it is rly nice to see your work and thought process!