I am experimenting with Angular material framework and really enjoy every feature! I really like the md-whiteframe directive on selecting specific containers. However, I notice that there are different ways to use it.
Angular Material Documentation uses it as a directive:
<div md-whiteframe="2">
<span>I'm elevated!</span>
</div>
While many examples use it as a class in CSS:
<div class="md-whiteframe-z2">
<span>I'm elevated!</span>
</div>
The documentation also states that md-whiteframe can raise up to 24dp, while the “version of the class” can only take 4 different levels.
What is the difference between both methods? When should I use a CSS directive or class?
, CSS Material Design Lite " ", Angular . , ...