Right, there is a thing called “scoped css” but its not exactly what you are after: Scoped CSS Addition
For what you want, you just need to use “normal” css:
some examples:
#myButton {
color: red;
}
.foo {
color: white;
}
#anotherButton.bar {
background-color: blue;
}
<button id="myButton" />
<button styleNames="foo" />
<button id="anotherButton" styleNames="foo bar" />