How to avoid duplication?

I just started with Hugo and I have a beginners question on avoiding duplication.

I started with the Hyde theme and I’m changing some of the graphical elements. For example I’m using one of the Hyde color themes. To do this I added a class to the body tag in hyde/layouts/index.html. But in order to get the theme applied on the whole site I needed to also edit the hyde/layouts/_default/list.html and hyde/layouts/_default/single.html.

I don’t like making the same change in three different places so I made a partial for the body tag and used that instead.

Next I’ll want to change the background color of the content and probably some other site wide elements.

So the question is a general one: when you’re making changes like this is the intent that you use a “partial”? Or do you generally just modifiy all three files? Or is there some other mechanism that I’m missing? (template variables?)