As I explore various Angular 2 frameworks, particularly Angular Material 2 and Ionic 2, I've noticed a difference in their component stylings. Some components have CSS directly applied to the tags, while others use classes for styling. For instance, when looking at the Card component, you might see styles like this:
md-card { // some styling }
as opposed to
.md-card { // some styling }
I'm trying to determine which approach would be considered a best practice. The project I am currently working on has a mix of both methods for different components.
One advantage of using styles on elements is that it results in less clutter in the HTML template since there's no need for an additional wrapping tag. Additionally, certain Decorators like HostBinding may be easier to implement with this approach.