I discovered and started using the responsive API provided by angular flex layout. While most of the time it works as intended, there are instances where I find myself duplicating directives in the code. Here's a simplified example:
<div>
<div ngClass.lt-md="mobile-cell">
<span fxHide fxShow.lt-md="true" class="mobile-label">Text1</span>
</div>
<div ngClass.lt-md="mobile-cell">
<span fxHide fxShow.lt-md="true" class="mobile-label">Text2</span>
</div>
<div ngClass.lt-md="mobile-cell">
<span fxHide fxShow.lt-md="true" class="mobile-label">Text3</span>
</div>
....
</div>
Is there a more elegant solution (perhaps utilizing pure CSS) to eliminate this repetition? For instance, is there a way to apply the mobile-cell
class to all sibling elements when the breakpoint is activated?