troubleshooting(dialog): Dialog title :before psuedo element
- 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
We are doing a migration to Material Angular 16 and when attempting to style the `mat-dialog-title` of a dialog. There is a `:before` pseudo element which has an empty string as content, and I believe the purpose of this element is to set the height of the title element with the `mat-dialog-title` directive. Is this correct? This implementation seems very hacky to me and flexbox `justify-content` does not work property because this pseudo element is considered an element within a flex container, and therefore the developer either needs to create a new flex container within the `mat-dialog-title` or remove the content from the `:before` psuedo element. Am I not not thinking of this correctly and is there another way to use `justify-content` which works with this psuedo element?
### Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
### Expected Behavior
If the `mat-dialog-title` container is a flex container, `justify-content: space-between` works correctly.
### Actual Behavior
`justify-content: space-between` adds space between the psuedo element which has an empty string as content and the next element within the `mat-dialog-title`
### Environment
- Angular: 16.2.10
- CDK/Material: 16.2.9
- Browser(s): Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Guía de contribución
Línea de trabajo
Comienza con los estilos del título del diálogo de Angular Material asociados a la directiva mat-dialog-title y reproduce el diseño en Firefox usando el ejemplo de flexbox del issue. Comprueba cómo afecta el pseudo-elemento :before a justify-content: space-between. Se considera hecho cuando el diseño flex del título del diálogo se comporta como se espera sin requerir un contenedor adicional ni la eliminación manual del pseudo-elemento.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100