I was just starting a comment on this but you beat me to it! I believe
contain: strict;
on the parent element would have been sufficient here. contain: strict;
on the parent element would have been sufficient here.