Form field Floating labels gaps not customizable and not taking into account the label actual size
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
#### Feature Description
So here is the thing. Since no dense mode and since we have a custom looking material inputs, I had to make my own customization on the scss theme of the form field. The problem appeared when I changed the font size and the font itself of the floating label. Suddenly I saw that the borders are overlapping the text.
```
const floatingLabelScale = 0.75;
const outlineGapPadding = 5;
```
these values are based on some assumption that the label size will never be customized.
Now, in order to override this behavior I had to create my own directive that changes the values
and recalculate the gaps.
So I would like to request a change of this logic to calculate gaps dynamically, or to expose these 2 numbers as inputs or something that can be changed from outside. I'm ok with an injection token as well.
#### Use Case
In order to allow more customization features and be able to change the font-size of the floating label.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xác định phần triển khai Angular Material form-field định nghĩa việc масштаб hóa các label nổi và các giá trị khoảng trống của outline, sau đó tái hiện sự cố với font và kích thước label tùy chỉnh. Xác định xem các khoảng trống nên được tính toán động hay được cung cấp để cấu hình; hoàn thành khi các label tùy chỉnh không còn chồng lên các đường viền.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, scss, typescript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100