How are margin-top and margin-bottom added to .scroll-content?

more importantly, is there a documented lifecycle here? I’ve got some layouts that conditionally render a FAB into view under certain circumstances, and in other circumstances conditionally add a footer (instead) - currently all of this is done via ngIf.

if I don’t mess with the viewport’s size / orientation, everything is fine. But if I go from wide to narrow view, the fab ends up showing up about 56px too high, which is precisely the height of the footer in wide view. I imagine the footer gets rendered in at some point, some viewcontroller says, “oh hey, a footer, I’d better add a margin-bottom so I don’t screw with scroll underlays” and then neglects to remove it when the footer is pulled from the DOM. If this is the case, I’d like to make another argument for using position: relative elements for things like footers instead of screwing around with z index and margins (they are more tricky to get right, but once they’re right the browser deals with the rest, and you don’t have to manually change margins and stuff, but I imagine they also require more modern browsers).

Either way, is there some kind of event I can fire to let the view controller know I’ve changed the DOM so it can recalculate margins and whatnot?