bug(form-field): remove hint wrapper when no hint provided
- 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
Even when no hint is provided, the hint-wrapper dom element still shows up.
This is because `mat-form-field-subscript-wrapper` has a margin as specified here:
```CSS
.mat-form-field-subscript-wrapper {
font-size: $subscript-font-size;
margin-top: $subscript-margin-top;
```

### Reproduction
Steps to reproduce:
1. Add an outline material form field without any hint and inspect.
eg:
```HTML
Outline form field
```
### Expected Behavior
When no hint is being provided, the wrapper dom element shouldn't render.
### Actual Behavior
The wrapper renders and takes up space.
### Environment
- Angular: 13.3.5
- CDK/Material: 13.3.5
- Browser(s): Chrome / all
- Operating System (e.g. Windows, macOS, Ubuntu): macOS/ all
Guía de contribución
Línea de trabajo
Comienza reproduciendo el ejemplo proporcionado de outline mat-form-field e inspecciona su DOM generado, especialmente el elemento mat-form-field-subscript-wrapper y su espaciado. El issue estará resuelto cuando un campo de formulario sin hint no renderice ese wrapper y no quede espacio no deseado.
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
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 68/100