Web attributed text mixes outerOutlineColor with outlineWidth
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- css, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Start in web_renderer/src/utils/parseAttributedText.ts, where applyOutline is called with outerOutlineColor ?? outlineColor and outerOutlineWidth ?? outlineWidth, then find the attributed-text layout measurement code that reuses the same pairing. Read the AttributedTextAttributes docs for the pairing rule. Done when an inner outline applies only with both outlineColor and outlineWidth, an outer outline only with both outer properties, and the web fallback for both outlines is documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The Valdi web renderer incorrectly combines an outer-outline color with an inner-outline width when outerOutlineWidth is omitted.
AttributedTextAttributes documents that both outerOutlineColor and outerOutlineWidth must be provided for an outer outline. Instead, the web renderer mixes independently configured inner and outer outline properties.
Reproduction
builder.append('28', {
color: '#78350f',
outerOutlineColor: '#fef3c7',
outlineColor: '#f59e0b',
outlineWidth: 1,
});
On web, this produces approximately:
-webkit-text-stroke: 1px rgb(254, 243, 199);
The renderer takes outerOutlineColor but falls back to the inner outlineWidth. The intended orange inner outline is therefore lost.
Cause
In web_renderer/src/utils/parseAttributedText.ts, outline values are selected independently:
applyOutline(
span,
style.outerOutlineColor ?? style.outlineColor,
style.outerOutlineWidth ?? style.outlineWidth,
context,
);
This allows a color from one outline pair to be combined with a width from the other. The same mixed-pair logic is also used when calculating attributed-text layout measurements.
Expected behavior
- Apply an inner outline only when both
outlineColorandoutlineWidthare set. - Apply an outer outline only when both
outerOutlineColorandouterOutlineWidthare set. - Never combine an outer property with an inner property.
- If web cannot render both outlines simultaneously, use a documented fallback rather than silently mixing them.
Actual behavior
outerOutlineColor overrides outlineColor, while outlineWidth is reused as the missing outer width. This renders the wrong color and suppresses the requested inner outline.
Environment
- Valdi commit:
e90a983749b384ba403c3bcdd40f7d0432404694 - Target: Web/Chromium
- Bazel: 8.x
- Ngôn ngữ chính
- C++
- Star
- 16.4k
- Fork
- 538
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Snapchat/Valdi
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add first tests for valdi_rxjsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Snapchat/Valdi
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
patrick-hudson/put.gd-desktop#2044 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
uxlfoundation/oneDNN#6604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: RoundToNearest truncates in plugins compiled with spcomp 1.13Có thể đã có người làm @fmu1337 đã nhận hôm nay. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
alliedmodders/sourcemod#2627 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
lballabio/QuantLib#3134 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày