bug(TABS): tabs with fitInkBarToContent does not follow Material 3 design specs
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
As per [Material 3 guidelines](https://m3.material.io/components/tabs/specs), primary tabs should have active indicator's height of `3px` and shape of `3px 3px 0 0`. In Angular Material, primary tabs' behaviour can be achieved using `[fitInkBarToContent]=true` input.
But, they have height of `2px`, and shape of `0`, which is right only for secondary tabs.
We can override it by using `tabs-overrides` mixin like below:
```scss
@use '@angular/material' as mat;
[fitInkBarToContent],
[ng-reflect-fit-ink-bar-to-content='true'] {
> .mat-mdc-tab-header {
@include mat.tabs-overrides(
(
active-indicator-shape: 3px 3px 0 0,
active-indicator-height: 3px,
)
);
}
}
```
But, it should be the default behaviour as per Material 3 specs.
### Reproduction
Not needed.
### Expected Behavior
Tabs with `[fitInkBarToContent]=true` should have active indicator's height of `3px` and shape of `3px 3px 0 0`.
### Actual Behavior
Tabs with `[fitInkBarToContent]=true` have active indicator's height of `2px`, and shape of `0`.
### Environment
- Angular: 19
- CDK/Material: 19
- Browser(s): Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dall’implementazione dei tabs di Angular Material e dal mixin tabs-overrides, seguendo il percorso fitInkBarToContent e gli stili di active-indicator su .mat-mdc-tab-header. Il lavoro è completato quando questo input produce un active indicator di 3px con una forma 3px 3px 0 0, in linea con l’aspettativa indicata di Material 3.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, scss, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100