question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tabs] Label has focused style after clicking

See original GitHub issue

The 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? 28209564-f8d1ae82-688a-11e7-921d-67afef413adb

After I click 28209574-0388d3a0-688b-11e7-8854-8f33e873c4fe

<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:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:26 (5 by maintainers)

github_iconTop GitHub Comments

56reactions
ruchit07commented, Jan 4, 2018

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!

38reactions
daniele-zuricocommented, Jul 20, 2017

But it’s inconsistent! If the first tab is selected by default it should have the same look and feel of clicked

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found