Unless you really, really need to be attaching styling directly to the html
and body
elements in a way which is specific to certain pages, I'd strongly recommend wrapping each entire page in a div with width: 100vw;
and height: 100vh;
and appropriate id
s, and then using the latter to style directly with css.
If you do need to attach directly to the html
and body
elements, have you tried to do this with an onAfterAction
hook in iron-router? Seems like a better place for it given that the styling depends on the route, not the template (even though Blaze means you can probably get away with what you're doing).