Scss namespace conflicts

Hello. I found an animated menu on codepen that uses html and css (scss really) that I would like to use in my app. The problem is that it was written in a way that styles common elements. For example, here is a snippet:

body{
  background:$bg;
  color:white;
  text-align:center;
}
a{
  color:inherit;
}
h1, h2, h3, h4{
  margin:0;
  margin-bottom:10px;
  margin-top:10px;
}
h1{
  font-size:3em;
}

This obviously has the potential to conflict with the styles I have set for my app. My question is whether there is a way to use this code and isolate the namespace without needing to manually go through it and change all of the h1, h2, etc. to custom IDs and classes? Thanks!