Using display:flex in HTML5 is the recommended approach.
This method can be useful for customizing framework buttons or other elements, but you may need to adjust padding and height settings accordingly.
For example, when working with angular-material tabs, some extra adjustments may be necessary to achieve a standard website navigation look.
It's worth noting how seamlessly angular-material handles the ripple effect even on larger surfaces.
.md-header{
/* CUSTOM HEIGHT SPECIFIED */
height: 50vh !important; /* '!important' APPLIES ONLY IN JSFIDDLE */
}
md-tab{
padding: 0 !important; /* '!important' APPLIES ONLY IN JSFIDDLE */
}
a{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
UPDATE 2018
AngularJS Material cautions against using flex on button elements, as not all HTML tags handle display:flex
consistently across browsers.
If encountering unexpected behavior, refer to flexbugs for troubleshooting tips.