From an HTML perspective, mat-raised-button
may look like an element attribute with no value, but as part of Angular Material, it is actually part of a component selector - the other part being the element name button
. So the combination <button mat-raised-button>
creates an Angular Material MatButton component which is not the same as a plain button plus CSS. This is usually fairly obvious, as most Angular Material components do not have an HTML equivalent an therefore have their own element names (e.g. <mat-toolbar>
), but there are a few exceptions to this such as <button>
.
When you 'use' Angular Material components (as well as directives) like MatButton, you are not merely 'styling' existing HTML components (like with Bootstrap-CSS for example). You are using components that have many features beyond what could be done with CSS only, and of course you are building on the feature-rich Angular platform.
So yes - you would have to refactor all of your code from mat-raised-button
to mat-stroked-button
should that requirement change. However, most code editors/IDEs nowadays make that a fairly straightforward task. Also, applications often 'wrap' common application patterns into their own components. So you can have a my-app-button
component that you use throughout your application which includes a MatButton, and then you would only have to change that single definition (or however many different button patterns your application might use).
If you are only interested in Material Design styling for standard HTML5 interfaces, other CSS-only solutions probably exist which might be a more appropriate choice (depending on application requirements).