troubleshooting(dialog): Dialog title :before psuedo element
- 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ả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với các kiểu tiêu đề hộp thoại Angular Material liên kết với directive mat-dialog-title và tái hiện bố cục trong Firefox bằng ví dụ flexbox của issue. Kiểm tra cách pseudo-element :before ảnh hưởng đến justify-content: space-between. Được xem là hoàn tất khi bố cục flex của tiêu đề hộp thoại hoạt động như mong đợi mà không cần thêm container hoặc xóa pseudo-element theo cách thủ công.
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, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100