I'm building a script that will add some HTML code to the page. That HTML code has style, let say I added
<div class="myplayer">
</div>
The code was added using JavaScript, but I also add styling, through CSS
.myplayer {
a_property: #fdfdfd;
}
Everything is fine. But wait, my script is expected to run on pages I don't have control over, someone while designing his pages put this code
.myplayer {
another_property: crap;
}
or
* {
that_property: crap;
}
That crap is now appearing on my script, because I'm assigining it. I could do in my CSS Class
.myplayer {
iterate_over_all_properties: default;
}
but the number of properties is a little bit overwhelming and I need to study each one a part. How do I avoid that interference?