bug(mat-toolbar): mat-toolbar styles for elements like h1, h2, ... are not taking precedence over mat-typography
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### 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
When a header tag is used within mat-toolbar the stylings from the theme do not take precedence.
The default styles from mat-typography are still used. Therefore the margin is not reset to 0 and the font-size also differs.

### Reproduction
https://stackblitz.com/edit/components-issue-t1dkvg
Steps to reproduce:
1. Apply mat-typography class to body
2. Add h1 tag with text to mat-toolbar
### Expected Behavior
Specific styles from mat-toolbar for these elements should take precedence. e.g. margin should be 0.
### Actual Behavior
Default mat-typography styles are used even though mat-toolbar would specify more accurate ones.
### Environment
- Angular: 15.0.2
- CDK/Material: 15.0.2
- Browser(s): Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Guía de contribución
Línea de trabajo
Comienza con la reproducción enlazada en StackBlitz y compara los estilos aplicados por mat-toolbar con los de la clase mat-typography en el body. Sigue los estilos tipográficos de la toolbar para h1, h2 y elementos similares; se considera terminado cuando sus estilos previstos de la toolbar tienen precedencia, incluido un margin de cero y el tamaño de fuente esperado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 52/100