I have mastered responsive html using Bootstrap, but now I need to dynamically remove elements based on screen resolution.
Let's compare browser view versus mobile view:
https://i.sstatic.net/q53aa.jpg
Depending on the resolution, certain buttons should lose their md-icon
, others should lose their text, and a few buttons should be hidden completely.
How can I achieve this using Angular and CSS?
Hide icon but keep text visible
Hide text but keep icon visible
Completely hide the button
Below is an excerpt of my code:
<!--Save Invoice-->
<td style="width:35%; text-align:right; padding-left:4px;">
<button class="book-button book-text-button book-std-bg" ng-click="vm.invoiceSave()">
<md-icon class="material-icons book-material" aria-label="Save">save</md-icon>
SAVE
</button>
</td>
<!--Pay Invoice-->
<td style="width:30%; text-align:right; padding-left:4px;" ng-if="vm.invoiceForm._id!='new'">
<button class="book-button book-text-button col-std-cyan" ng-click="vm.invoicePay()">
<md-icon class="material-icons book-material" aria-label="Payment">monetization_on</md-icon>
PAY
</button>
</td>
<!--Print Invoice-->
<td style="width:5%; text-align:right; padding-left:4px;">
<button class="book-button book-text-button col-std-black" ng-click="vm.printInvoice()">
<md-icon class="material-icons book-material" aria-label="Print">print</md-icon>
</button>
</td>