[Tabs] Label has focused style after clicking
See original GitHub issueThe first time that I load the tabs by default is set the first tab correctly however the opacity of the first tab is not set to 1. After that I click on it the opacity change in the correct way. Is that an Issue or I’m missing something?
After I click
<md-tab-group> <md-tab> <ng-template md-tab-label> All Orders <div class="bubble" #allOrdersBubble >{{allOrdersCount}}</div> </ng-template> <iag-all-orders (onPickup)="refreshItems()"></iag-all-orders> </md-tab> <md-tab> <ng-template md-tab-label style="opacity: 1"> My Orders <div class="bubble" #myOrdersBubble>{{myOrdersCount}}</div> </ng-template> <iag-my-orders (onRefresh)="refreshItems($event)"></iag-my-orders> </md-tab> </md-tab-group>
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:26 (5 by maintainers)
Top Results From Across the Web
Angular material active tab label color changes when clicking ...
The opacity and background color is changed dynamically based on focus. You need to control that. Something like
Read more >Tabs - Angular Material
Event emitted when a label is focused. scrollDistance: number. Sets the distance in pixels that the tab header should be transformed in the...
Read more >Example of Tabs with Automatic Activation | APG | WAI - W3C
Indicates the element serves as a tab control. When focused, it is automatically activated, causing its associated tabpanel to be displayed.
Read more >focus - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The :focus CSS pseudo-class represents an element (such as a form input) that has received focus. It is generally triggered when the user ......
Read more >Links - Usability & Web Accessibility - Yale University
Focus Styles. Keyboard-only users press the tab key to navigate through interactive elements like links. As such, it is important that users be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was facing the same problem. @daniele-zurico You are correct. Selected tab is not showing background color and opacity 1. But when we clicked on that tab, it’s showing.
But you can apply whatever design you want to apply on selected tab on class “mat-tab-label-active”.
.mat-tab-label-active{ background-color: #3398dc !important; opacity: 1 !important; }
This might help!
But it’s inconsistent! If the first tab is selected by default it should have the same look and feel of clicked