Css - using bootstrap classes with material design

Example:
Let’s say I want to use bootstraps btn-danger or btn-success class on a btn in the Anvil Material Design
Is there a way I can assign a btn one of these classes instead of btn-default?
Currently each btn has the class btn btn-default

I know I’d need to remove some of the btn-danger/btn-sucess css code in the theme to make it work, but that seems straight forward enough and works easily enough in dev-tools. I’m just not sure how to replace btn-default with btn-danger.

The work around:
add a role called color-danger
in the css use .color-danger > .btn

But since btn-danger is a class in bootstrap and anvil ships with bootstrap, is there not a better way?

I think that your workaround is the right approach here! We try to avoid surfacing the Bootstrap API in Anvil (we want to preserve the option to write non-Bootstrap-based themes in future), so you should use the roles mechanism.