You can do it with only body and html but it seems you faced the quirk related to the overflow propagation that didn't allow you to resize the body (one of the hidden quirk of CSS that no one talk about or at least a few are aware of).
Here is a a demo: codepen.io/t_afif/pen/vYxOwOm. The fix is to set an explicit value of overflow to html to avoid the propagation
You can do it with only body and html but it seems you faced the quirk related to the overflow propagation that didn't allow you to resize the body (one of the hidden quirk of CSS that no one talk about or at least a few are aware of).
Here is a a demo: codepen.io/t_afif/pen/vYxOwOm. The fix is to set an explicit value of overflow to html to avoid the propagation
More details here: drafts.csswg.org/css-overflow-3/#o...
That's a nice tip